Skip to content

Commit

Permalink
Merge pull request #255 from swfz/feature/fix-hydration-mismatch
Browse files Browse the repository at this point in the history
fix: following hydration mismatch
  • Loading branch information
swfz authored Sep 26, 2022
2 parents b8af0bf + 7a19920 commit d010059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useMedia } from 'react-use';
import { ClockIcon, AdjustmentsIcon, GridIcon } from './icon';

function Layout({ children }: { children: ReactNode }) {
const isWide = useMedia('(min-width: 640px)');
const isWide = useMedia('(min-width: 640px)', false);
const [isOpen, setIsOpen] = useState(isWide);

const togglOpen = (event: MouseEvent<SVGElement>) => {
setIsOpen(!isOpen);
setIsOpen((prev) => !prev);
};

return (
Expand Down

1 comment on commit d010059

@vercel
Copy link

@vercel vercel bot commented on d010059 Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tools – ./

tools-git-main-swfz.vercel.app
tools-swfz.vercel.app
tools-psi.vercel.app
tools.swfz.io

Please sign in to comment.