mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
remove codehike completely
This commit is contained in:
1 parent
bd0514553c
commit
09e16db420
4 files changed
+3
-44
No files matched your search
@@ -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 <StepHike.Step> 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 (
|
||||
<div className="">
|
||||
{/* <div
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Mermaid } from 'mdx-mermaid/lib/Mermaid'
|
||||
import InlineCodeTag from './CustomHTMLElements/InlineCode'
|
||||
import React from 'react'
|
||||
import RefSubLayout from '~/layouts/ref/RefSubLayout'
|
||||
import { CH } from '@code-hike/mdx/components'
|
||||
// import { CH } from '@code-hike/mdx/components'
|
||||
import RefHeaderSection from './reference/RefHeaderSection'
|
||||
|
||||
const components = {
|
||||
@@ -61,7 +61,7 @@ const components = {
|
||||
mono: (props: any) => <code className="text-sm">{props.children}</code>,
|
||||
// inlineCode: (props: { children: string }) => <InlineCodeTag {...props} />,
|
||||
RefSubLayout,
|
||||
CH,
|
||||
// CH,
|
||||
code: (props: any) => <CodeBlock {...props} />,
|
||||
RefHeaderSection: (props: any) => <RefHeaderSection {...props} />,
|
||||
}
|
||||
|
||||
@@ -5,25 +5,15 @@ title: Typescript Support
|
||||
|
||||
`supabase-js` supports Typescript.
|
||||
|
||||
<RefSubLayout.Details>
|
||||
|
||||
## Generating types
|
||||
|
||||
hello world
|
||||
|
||||
You can use our CLI to generate types:
|
||||
|
||||
</RefSubLayout.Details>
|
||||
|
||||
<RefSubLayout.Examples>
|
||||
|
||||
```bash
|
||||
supabase start
|
||||
supabase gen types typescript --local > lib/database.types.ts
|
||||
```
|
||||
|
||||
</RefSubLayout.Examples>
|
||||
|
||||
These types are generated directly from your database. Given a table `public.movies`, the definition will provide the following data:
|
||||
|
||||
```tsx hello.ts
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user