Skip to content

Commit

Permalink
fix: [LINKER-137] 바텀싯 로컬 서버 에러 수정 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
useonglee authored Feb 23, 2024
1 parent 6c792f6 commit 5aa553e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/lds/src/BottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ interface Props extends Omit<BottomSheetContext, 'open'> {
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 }));
Expand Down

0 comments on commit 5aa553e

Please sign in to comment.