fix some guides

This commit is contained in:
Jonathan Summers-Muir committed 2022-12-11 03:39:16 +08:00
1 parent d1eee17daa
commit d9d96e1228
5 files changed
+8 -24

No files matched your search

@@ -193,7 +193,7 @@ const SideNav = () => {
{
label: 'Auth',
icon: '/img/icons/menu/auth',
href: '/guides/auth',
href: '/guides/auth/overview',
level: 'auth',
},
{
+3 -2
View File
@@ -19,6 +19,7 @@ interface Props {
children: any
toc?: any
currentPage?: string
hideToc?: boolean
}
const Layout: FC<Props> = (props) => {
@@ -92,7 +93,7 @@ const Layout: FC<Props> = (props) => {
<div
className={[
'relative',
'col-span-9',
!props.hideToc ? 'col-span-9' : 'col-span-12',
'transition-all ease-out',
'duration-100',
active ? 'opacity-100 left-0' : 'opacity-0 left-6',
@@ -115,7 +116,7 @@ const Layout: FC<Props> = (props) => {
<MDXProvider components={components}>{props.children}</MDXProvider>
</article>
</div>
{hasTableOfContents && !props.meta?.hide_table_of_contents && (
{!props.hideToc && hasTableOfContents && !props.meta?.hide_table_of_contents && (
<div
className={[
'col-span-3',
@@ -148,5 +148,5 @@ The fastest way to get started with supabase and NextJS is to use the supabase-j
</StepHikeCompact>
export const Page = ({ children }) => <Layout meta={meta} children={children} />
export const Page = ({ children }) => <Layout meta={meta} children={children} hideToc={true} />
export default Page
@@ -144,5 +144,5 @@ The fastest way to get started with supabase and Nuxt.js is to use the supabase-
</StepHikeCompact>
export const Page = ({ children }) => <Layout meta={meta} children={children} />
export const Page = ({ children }) => <Layout meta={meta} children={children} hideToc={true} />
export default Page
@@ -88,22 +88,6 @@ The fastest way to get started with supabase and create-react-app is to use the
</StepHikeCompact.Details>
<StepHikeCompact.Code>
```sql SQL_EDITOR
-- this creates the table
CREATE TABLE countries (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
-- insert some sample data into new table
INSERT INTO countries (name) VALUES ('United States');
INSERT INTO countries (name) VALUES ('Canada');
INSERT INTO countries (name) VALUES ('Mexico');
````
</StepHikeCompact.Code>
</StepHikeCompact.Step>
<StepHikeCompact.Step step={6}>
@@ -112,9 +96,9 @@ The fastest way to get started with supabase and create-react-app is to use the
You can select from the countries table in your Supabase server by doing the following:
</StepHikeCompact.Details>
<StepHikeCompact.Code>
```js src/index.js
import { createClient } from '@supabase-js'
@@ -129,9 +113,8 @@ The fastest way to get started with supabase and create-react-app is to use the
</StepHikeCompact.Code>
</StepHikeCompact.Step>
</StepHikeCompact>
export const Page = ({ children }) => <Layout meta={meta} children={children} />
export const Page = ({ children }) => <Layout meta={meta} children={children} hideToc={true} />
export default Page