Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

remove event listener when unmounting

Francesco Sansalvadore73b6092a39e4
diff --git a/apps/www/components/Globe.tsx b/apps/www/components/Globe.tsx
index 49470073455..8cf57e7ff59 100644
--- a/apps/www/components/Globe.tsx
+++ b/apps/www/components/Globe.tsx
@@ -51,7 +51,10 @@ const Globe = () => {
},
})
setTimeout(() => (canvasRef.current.style.opacity = '1'))
- return () => cobe.destroy()
+ return () => {
+ cobe.destroy()
+ window.removeEventListener('resize', onResize)
+ }
}, [isDarkMode])
return (