Skip to content

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

fix: minor sentry issues (#44148)

Ali Waseemdcab88059b12
diff --git a/apps/studio/components/interfaces/App/CommandMenu/CreateCommands.tsx b/apps/studio/components/interfaces/App/CommandMenu/CreateCommands.tsx
index fb1c5140345..bb107f0a5fb 100644
--- a/apps/studio/components/interfaces/App/CommandMenu/CreateCommands.tsx
+++ b/apps/studio/components/interfaces/App/CommandMenu/CreateCommands.tsx
@@ -46,7 +46,6 @@ const EdgeFunctions = dynamic(() => import('icons').then((mod) => mod.EdgeFuncti
const AnalyticsBucket = dynamic(() => import('icons').then((mod) => mod.AnalyticsBucket))
const FilesBucket = dynamic(() => import('icons').then((mod) => mod.FilesBucket))
const VectorBucket = dynamic(() => import('icons').then((mod) => mod.VectorBucket))
-const Graphql = dynamic(() => import('icons').then((mod) => mod.Graphql))
const CREATE_STUDIO_ENTITY = 'Create Studio Entity'
diff --git a/apps/studio/hooks/misc/useSchemaQueryState.ts b/apps/studio/hooks/misc/useSchemaQueryState.ts
index 12ab49493aa..e78eeb49765 100644
--- a/apps/studio/hooks/misc/useSchemaQueryState.ts
+++ b/apps/studio/hooks/misc/useSchemaQueryState.ts
@@ -1,8 +1,7 @@
+import { LOCAL_STORAGE_KEYS, useParams } from 'common'
import { parseAsString, useQueryState } from 'nuqs'
import { useEffect, useMemo } from 'react'
-import { LOCAL_STORAGE_KEYS, useParams } from 'common'
-
/**
* This hook wraps useQueryState because useQueryState imports app router for some reason which breaks the SSR in
* the playwright tests. I've localized the issue to "NODE_ENV='test'" in the playwright tests.
@@ -25,7 +24,7 @@ export const useQuerySchemaState = () => {
const { ref } = useParams()
const defaultSchema =
- typeof window !== 'undefined' && ref && ref.length > 0
+ typeof window !== 'undefined' && !!window.localStorage && ref && ref.length > 0
? window.localStorage.getItem(LOCAL_STORAGE_KEYS.LAST_SELECTED_SCHEMA(ref)) || 'public'
: 'public'
@@ -36,7 +35,7 @@ export const useQuerySchemaState = () => {
useEffect(() => {
// Update the schema in local storage on every change
- if (typeof window !== 'undefined' && ref && ref.length > 0) {
+ if (typeof window !== 'undefined' && !!window.localStorage && ref && ref.length > 0) {
window.localStorage.setItem(LOCAL_STORAGE_KEYS.LAST_SELECTED_SCHEMA(ref), schema)
}
}, [schema, ref])