mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
fix: minor sentry issues (#44148)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? fixes: - [SUPABASE-APP-ER2](https://supabase.sentry.io/issues/7360649020/?project=5459134) - [SUPABASE-APP-ERM](https://supabase.sentry.io/issues/7361072759/?project=5459134) --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
This commit is contained in:
1 parent
87cd172567
commit
dcab88059b
2 files changed
+3
-5
No files matched your search
@@ -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'
|
||||
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in new issue
Block a user