mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix (docs): non-platform integrations page (#35285)
There were two bugs when trying to run the integrations page locally with NEXT_PUBLIC_IS_PLATFORM=false: 1. The IS_PLATFORM check imported from common was not evaluating correctly to a boolean. This is because I slapped a 'use client' on the entire common package last year -_-""" which caused all its imports to be evaluated to functions when used in server components. I have now moved the 'use client's down to the submodules that actually need it. 2. When the integrations submenu is empty, the navigation menu errors out because it expects all navigation items to either have children or have links. Have updated this to gracefully hide empty headers.
This commit is contained in:
1 parent
d75b7c37bb
commit
30b6af4ff3
6 files changed
+12
-6
No files matched your search
@@ -169,9 +169,9 @@ const Content = (props) => {
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
) : x.url ? (
|
||||
<ContentLink url={x.url} icon={x.icon} name={x.name} key={x.name} />
|
||||
)}
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
'use client'
|
||||
|
||||
import { FlagValues } from '@vercel/flags/react'
|
||||
import { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'
|
||||
|
||||
@@ -123,9 +125,9 @@ export const FeatureFlagProvider = ({
|
||||
|
||||
return (
|
||||
<FeatureFlagContext.Provider value={store}>
|
||||
{/*
|
||||
{/*
|
||||
[Joshen] Just support configcat flags in Vercel flags for now for simplicity
|
||||
although I think it should be fairly simply to support PH too
|
||||
although I think it should be fairly simply to support PH too
|
||||
*/}
|
||||
<FlagValues values={store.configcat} />
|
||||
{children}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
'use client'
|
||||
|
||||
import { useSyncExternalStore } from 'react'
|
||||
import type * as React from 'react'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
'use client'
|
||||
|
||||
export * from './useAnchorObserver'
|
||||
export * from './useBreakpoint'
|
||||
export * from './useConstant'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client'
|
||||
|
||||
export * from './auth'
|
||||
export * from './constants'
|
||||
export * from './database-types'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
'use client'
|
||||
|
||||
import { components } from 'api-types'
|
||||
import { useRouter } from 'next/compat/router'
|
||||
import { usePathname } from 'next/navigation'
|
||||
|
||||
Reference in new issue
Block a user