test navigation

This commit is contained in:
Karol Wypchlo 2021-04-01 11:51:45 +02:00
parent cde554b5ec
commit 96533fa50d
2 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,7 @@ const FixedHeader = () => {
return ( return (
<div ref={ref} className="fixed inset-x-0 top-0 z-50"> <div ref={ref} className="fixed inset-x-0 top-0 z-50">
<NewsHeader /> <NewsHeader />
<Navigation mode={mode} /> <Navigation mode={mode} yyy={y} />
</div> </div>
); );
}; };

View File

@ -16,7 +16,7 @@ const routes = [
{ title: "News", to: "/news" }, { title: "News", to: "/news" },
]; ];
const Navigation = ({ mode }) => { const Navigation = ({ mode, yyy = 0 }) => {
const navRef = React.useRef(null); const navRef = React.useRef(null);
const [open, setOpen] = React.useState(false); const [open, setOpen] = React.useState(false);
const windowSize = useWindowSize(); const windowSize = useWindowSize();
@ -50,6 +50,9 @@ const Navigation = ({ mode }) => {
<Link to="/" className={classnames("flex flex-shrink-0 items-center")}> <Link to="/" className={classnames("flex flex-shrink-0 items-center")}>
{mode === "dark" && <LogoWhiteText className="h-8 desktop:h-10" />} {mode === "dark" && <LogoWhiteText className="h-8 desktop:h-10" />}
{mode === "light" && <LogoBlackText className="h-8 desktop:h-10" />} {mode === "light" && <LogoBlackText className="h-8 desktop:h-10" />}
<span className="bg-white text-xs p-1 tabular-nums">
({yyy}) ({offsetY})
</span>
</Link> </Link>
<div className="ml-auto flex items-center desktop:hidden z-10"> <div className="ml-auto flex items-center desktop:hidden z-10">
<button <button