Skip to content

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

More keys

Terry Suttoneba225523acf
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.utils.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.utils.ts
new file mode 100644
index 00000000000..ad3d100450f
--- /dev/null
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.utils.ts
@@ -0,0 +1,6 @@
+// check if the link is allowed to be displayed
+export function isFuncNotInLibraryOrVersion(id, type, allowedKeys) {
+ if (id && allowedKeys && !allowedKeys.includes(id) && type !== 'markdown') {
+ return true
+ }
+}
diff --git a/apps/docs/components/reference/RefSectionHandler.tsx b/apps/docs/components/reference/RefSectionHandler.tsx
index 75476287461..d54e5d616bb 100644
--- a/apps/docs/components/reference/RefSectionHandler.tsx
+++ b/apps/docs/components/reference/RefSectionHandler.tsx
@@ -36,16 +36,17 @@ const RefSectionHandler = (props) => {
return (
<RefSubLayout>
- {props.sections.map((x) => {
+ {props.sections.map((x, i) => {
switch (x.type) {
case 'markdown':
const markdownData = props.pageProps.docs.find((doc) => doc.id === x.id)
- return <RefEducationSection item={x} markdownContent={markdownData} />
+ return <RefEducationSection key={x.id + i} item={x} markdownContent={markdownData} />
break
case 'function':
return (
<RefFunctionSection
+ key={x.id + i}
funcData={x}
commonFuncData={x}
spec={props.spec}
@@ -53,13 +54,21 @@ const RefSectionHandler = (props) => {
/>
)
case 'cli-command':
- return <CliCommandSection funcData={x} commonFuncData={x} />
+ return <CliCommandSection key={x.id + i} funcData={x} commonFuncData={x} />
break
case 'operation':
- return <ApiOperationSection funcData={x} commonFuncData={x} spec={props.spec} />
+ return (
+ <ApiOperationSection
+ key={x.id + i}
+ funcData={x}
+ commonFuncData={x}
+ spec={props.spec}
+ />
+ )
default:
return (
<RefFunctionSection
+ key={x.id + i}
funcData={x}
commonFuncData={x}
spec={props.spec}
diff --git a/apps/docs/layouts/ref/RefSubLayout.tsx b/apps/docs/layouts/ref/RefSubLayout.tsx
index 3357e427ed1..fb3668fc594 100644
--- a/apps/docs/layouts/ref/RefSubLayout.tsx
+++ b/apps/docs/layouts/ref/RefSubLayout.tsx
@@ -55,10 +55,9 @@ const RefSubLayout: FC<RefSubLayoutType> & RefSubLayoutSubComponents = (props) =
}
const Section: FC<ISectionContainer> = (props) => {
- // console.log({ props })
return (
<article
- key={props.id}
+ key={props.id + 'section'}
className={[
props.singleColumn ? 'prose dark:prose-dark w-full' : 'w-full',
'py-16 lg:py-32 first:pt-8 last:pb-8',
@@ -149,10 +148,9 @@ const EducationRow: FC<IEducationRow> = (props) => {
}
const EducationSection: FC<IEducationSection> = ({ icon, hideTitle = false, ...props }) => {
- // console.log({ props })
return (
<article
- key={props.id}
+ key={props.id + 'education'}
className={'prose dark:prose-dark max-w-none py-16 lg:py-32 first:pt-8 last:pb-8'}
>
{!hideTitle && <StickyHeader {...props} icon={icon} />}