Skip to content

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

chore: clean up

phamhieua1e3a2b7b16d
diff --git a/studio/hooks/misc/withAuth.tsx b/studio/hooks/misc/withAuth.tsx
index 1ebbe3ef816..2c6e1b84f74 100644
--- a/studio/hooks/misc/withAuth.tsx
+++ b/studio/hooks/misc/withAuth.tsx
@@ -1,10 +1,8 @@
import { useProfile, useStore } from 'hooks'
import { ComponentType, useEffect, useState } from 'react'
-import { flatten, isUndefined } from 'lodash'
import { NextRouter, useRouter } from 'next/router'
import { IS_PLATFORM } from 'lib/constants'
import Connecting from 'components/ui/Loading'
-import { Project } from 'types'
const PLATFORM_ONLY_PAGES = ['storage', 'reports', 'settings']
@@ -79,7 +77,7 @@ export function withAuth(
}
function defaultRedirectTo(ref: string | string[] | undefined) {
- return IS_PLATFORM ? '/' : !isUndefined(ref) ? `/project/${ref}` : '/'
+ return IS_PLATFORM ? '/' : ref !== undefined ? `/project/${ref}` : '/'
}
function checkRedirectTo(