From 5aa553ec00f887606dbd543f75f3d50256cfb228 Mon Sep 17 00:00:00 2001 From: Useong Lee Date: Fri, 23 Feb 2024 21:01:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[LINKER-137]=20=EB=B0=94=ED=85=80?= =?UTF-8?q?=EC=8B=AF=20=EB=A1=9C=EC=BB=AC=20=EC=84=9C=EB=B2=84=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95=20(#69)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/lds/src/BottomSheet/BottomSheet.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/lds/src/BottomSheet/BottomSheet.tsx b/packages/lds/src/BottomSheet/BottomSheet.tsx index 78d98823..56fc247f 100644 --- a/packages/lds/src/BottomSheet/BottomSheet.tsx +++ b/packages/lds/src/BottomSheet/BottomSheet.tsx @@ -14,7 +14,10 @@ interface Props extends Omit { children: ReactNode; } -const BottomSheet = ({ children, height = window.innerHeight - 56 }: Props) => { +const isServer = typeof window === 'undefined'; +const HEIGHT = isServer ? 0 : window.innerHeight - 56; + +const BottomSheet = ({ children, height = HEIGHT }: Props) => { const [isOpen, setIsOpen] = useState(false); const [{ y }, x] = useSpring(() => ({ y: height }));