From 09e16db4206957433fc8af365bd5fb438d5305dc Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Sun, 11 Dec 2022 15:04:44 +0800 Subject: [PATCH] remove codehike completely --- apps/docs/components/StepHike/index.tsx | 26 +------------------ apps/docs/components/index.tsx | 4 +-- .../javascript/typescript-support.mdx | 10 ------- apps/docs/lib/mdx/generateOldRefMarkdown.tsx | 7 ----- 4 files changed, 3 insertions(+), 44 deletions(-) diff --git a/apps/docs/components/StepHike/index.tsx b/apps/docs/components/StepHike/index.tsx index af65670d7ff..cbb2731004f 100644 --- a/apps/docs/components/StepHike/index.tsx +++ b/apps/docs/components/StepHike/index.tsx @@ -1,18 +1,14 @@ -import { useEffect, useRef, useState } from 'react' +import { useEffect, useState } from 'react' import { useInView } from 'react-intersection-observer' -import { Button } from 'ui' import { StepHikeContext } from './StepHikeContext' const StepHike = ({ children, title }) => { const [activeStep, setActiveStep] = useState(undefined) - //console.log('step hike children', children) - // check if there are any children if (!children) throw 'StepHike component requires children' const steps = children.filter((x) => { - //console.log('child stuff', x) return x.type.name === 'Step' }) @@ -29,26 +25,6 @@ const StepHike = ({ children, title }) => { // console.log('length of the steps filter', steps.length) - function handleNext() { - const nextStep: number = activeStep.step + 1 - console.log(nextStep) - - setActiveStep({ - titleId: steps[nextStep].props.title.replaceAll(' ', '-').toLowerCase(), - step: nextStep, - }) - } - - function handlePrev() { - const nextStep: number = activeStep.step - 1 - console.log(nextStep) - - setActiveStep({ - titleId: steps[nextStep].props.title.replaceAll(' ', '-').toLowerCase(), - step: nextStep, - }) - } - return (
{/*
{props.children}, // inlineCode: (props: { children: string }) => , RefSubLayout, - CH, + // CH, code: (props: any) => , RefHeaderSection: (props: any) => , } diff --git a/apps/docs/docs/reference/javascript/typescript-support.mdx b/apps/docs/docs/reference/javascript/typescript-support.mdx index b26151cac0c..ca747ef105b 100644 --- a/apps/docs/docs/reference/javascript/typescript-support.mdx +++ b/apps/docs/docs/reference/javascript/typescript-support.mdx @@ -5,25 +5,15 @@ title: Typescript Support `supabase-js` supports Typescript. - - ## Generating types -hello world - You can use our CLI to generate types: - - - - ```bash supabase start supabase gen types typescript --local > lib/database.types.ts ``` - - These types are generated directly from your database. Given a table `public.movies`, the definition will provide the following data: ```tsx hello.ts diff --git a/apps/docs/lib/mdx/generateOldRefMarkdown.tsx b/apps/docs/lib/mdx/generateOldRefMarkdown.tsx index 58eca052915..2358fd5c698 100644 --- a/apps/docs/lib/mdx/generateOldRefMarkdown.tsx +++ b/apps/docs/lib/mdx/generateOldRefMarkdown.tsx @@ -1,8 +1,5 @@ import { serialize } from 'next-mdx-remote/serialize' -import { remarkCodeHike } from '@code-hike/mdx' -import codeHikeTheme from '~/codeHikeTheme.js' - import toc from 'markdown-toc' import { getDocsBySlug } from '~/lib/docs' @@ -12,10 +9,6 @@ async function generateOldRefMarkdown(slug) { const content = await serialize(doc.content ?? '', { // MDX's available options, see the MDX docs for more info. // https://mdxjs.com/packages/mdx/#compilefile-options - mdxOptions: { - remarkPlugins: [[remarkCodeHike, { autoImport: false, codeHikeTheme, showCopyButton: true }]], - useDynamicImport: true, - }, // Indicates whether or not to parse the frontmatter from the mdx source }) return {