mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 23:29:08 +03:00
Update vercel-toolbar.tsx
This commit is contained in:
1 parent
bfa65b35cb
commit
677775b7ac
1 file changed
+10
-2
@@ -1,13 +1,21 @@
|
||||
import { VercelToolbar } from '@vercel/toolbar/next'
|
||||
import dynamic from 'next/dynamic'
|
||||
import { useUser } from 'common'
|
||||
|
||||
import { PropsWithChildren } from 'react'
|
||||
|
||||
// Dynamically import VercelToolbar to load it only when required
|
||||
const VercelToolbar = dynamic(
|
||||
() => import('@vercel/toolbar/next').then((mod) => mod.VercelToolbar),
|
||||
{
|
||||
ssr: false, // Disable SSR for this component
|
||||
}
|
||||
)
|
||||
|
||||
export default function VercelToolbarProvider({ children }: PropsWithChildren<{}>) {
|
||||
const user = useUser()
|
||||
|
||||
const isSupabaseTeam =
|
||||
user?.email?.includes('@supabase.com') || user?.email?.includes('@supabase.io')
|
||||
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
|
||||
Reference in new issue
Block a user