diff options
| author | Yash <[email protected]> | 2024-04-03 10:48:29 +0000 |
|---|---|---|
| committer | Yash <[email protected]> | 2024-04-03 10:48:29 +0000 |
| commit | bed6d65ffa6a3886d77d497463748983c822100d (patch) | |
| tree | c88c0292adec220659cda32a45cc8cfcd02213ac /apps/web/src/hooks | |
| parent | remove debug lie (diff) | |
| download | archived-supermemory-bed6d65ffa6a3886d77d497463748983c822100d.tar.xz archived-supermemory-bed6d65ffa6a3886d77d497463748983c822100d.zip | |
animation with framer motion
Diffstat (limited to 'apps/web/src/hooks')
| -rw-r--r-- | apps/web/src/hooks/useViewport.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/web/src/hooks/useViewport.ts b/apps/web/src/hooks/useViewport.ts index ca4ec741..f24ed2d2 100644 --- a/apps/web/src/hooks/useViewport.ts +++ b/apps/web/src/hooks/useViewport.ts @@ -1,7 +1,10 @@ import { useState, useEffect } from "react"; function getViewport() { - const { innerWidth: width, innerHeight: height } = window; + const { innerWidth: width, innerHeight: height } = window ?? { + innerWidth: 0, + innerHeight: 0, + }; return { width, height, |