Skip to content

Commit

Permalink
fix conditional hook
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaraBread committed Apr 3, 2024
1 parent e5db3aa commit c138c90
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/app/(pages)/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ function NavLink(props: {href: string, currentPath: string, onClick: () => void,
const defaultWidth = 2000;
// from https://blog.logrocket.com/developing-responsive-layouts-with-react-hooks/
const useWidth = () => {
if (typeof window === "undefined") {
// serverside rendering
return {width: defaultWidth};
}
const [width, setWidth] = useState(defaultWidth);

useEffect(() => {
Expand Down

0 comments on commit c138c90

Please sign in to comment.