Skip to content

Commit

Permalink
fix: window is not defined 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Sep 3, 2023
1 parent c323f23 commit 60992b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import { useEffect } from "react";
import styled from "styled-components";
import { colors, media } from "styles/theme";

Expand All @@ -9,7 +10,9 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
}
};

window.addEventListener("touchmove", preventZoom, { passive: false });
useEffect(() => {
window.addEventListener("touchmove", preventZoom, { passive: false });
}, []);

return (
<LayoutWrapper>
Expand Down

0 comments on commit 60992b7

Please sign in to comment.