mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
More keys
This commit is contained in:
1 parent
82d7eaed40
commit
eba225523a
3 files changed
+21
-8
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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}
|
||||
|
||||
@@ -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} />}
|
||||
|
||||
Reference in new issue
Block a user