aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/hooks
diff options
context:
space:
mode:
authorYash <[email protected]>2024-04-03 10:48:29 +0000
committerYash <[email protected]>2024-04-03 10:48:29 +0000
commitbed6d65ffa6a3886d77d497463748983c822100d (patch)
treec88c0292adec220659cda32a45cc8cfcd02213ac /apps/web/src/hooks
parentremove debug lie (diff)
downloadarchived-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.ts5
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,