fix builds

This commit is contained in:
Jonathan Summers-Muir committed 2022-12-08 11:17:12 +08:00
1 parent 97102b95bc
commit bf20dd38cc
7 files changed
+271 -608

No files matched your search

@@ -126,6 +126,8 @@ const CodeBlock: FC<Props> = ({
`${!title ? 'top-2' : 'top-[3.25rem]'}`,
].join(' ')}
>
{/* //
@ts-ignore */}
<CopyToClipboard text={value || children}>
<Button
type="default"
@@ -13,7 +13,11 @@ import { useInView } from 'react-intersection-observer'
* of our page, it will not be counted as visible.
*/
const Heading = ({ tag, children }) => {
interface Props {
tag: string
}
const Heading: React.FC<Props> = ({ tag, children }) => {
const HeadingTag = `${tag}` as any
const anchor = getAnchor(children)
const link = `#${anchor}`
@@ -1,11 +1,13 @@
const InlineCodeTag = ({ children }) => {
import { FC } from 'react'
const InlineCodeTag = ({ children }: any) => {
// If children isn't a string, just return it as is, just in case
if (typeof children !== 'string') return children
// check the length of the string inside the <code> tag
// if it's fewer than 70 characters, add a white-space: pre so it doesn't wrap
const classes = children.length < 70 ? 'short-inline-codeblock' : ''
const className = children.length < 70 ? 'short-inline-codeblock' : ''
return <code className={classes}>{children}</code>
return <code className={className}> HELLO WORLD {children}</code>
}
export default InlineCodeTag
+2 -1
View File
@@ -19,6 +19,7 @@ import QuickstartIntro from './MDX/quickstart_intro.mdx'
import ProjectSetup from './MDX/project_setup.mdx'
import { Mermaid } from 'mdx-mermaid/lib/Mermaid'
import InlineCodeTag from './CustomHTMLElements/InlineCode'
import React from 'react'
const components = {
Admonition,
@@ -57,7 +58,7 @@ const components = {
},
code: (props: any) => <CodeBlock {...props} />,
mono: (props: any) => <code className="text-sm">{props.children}</code>,
inlineCode: (props: any) => <InlineCodeTag>{props.children}</InlineCodeTag>,
inlineCode: (props: { children: string }) => <InlineCodeTag {...props} />,
}
export default components
File diff suppressed because it is too large. Load diff
+7 -7
View File
@@ -78,6 +78,12 @@
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/edge-functions</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/launch-week/ticket-image</loc>
<changefreq>weekly</changefreq>
@@ -103,7 +109,7 @@
</url>
<url>
<loc>https://supabase.com/edge-functions</loc>
<loc>https://supabase.com/realtime</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
@@ -114,12 +120,6 @@
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/realtime</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/blog/supabase-alpha-april-2020</loc>
<changefreq>weekly</changefreq>
@@ -31,7 +31,9 @@ const GlassPanel = ({
const { isDarkMode } = useTheme()
const IconBackground: React.FC = (props) => (
<div className={showIconBg && 'bg-green-600 w-8 h-8 flex items-center justify-center rounded'}>
<div
className={showIconBg ? 'bg-green-600 w-8 h-8 flex items-center justify-center rounded' : ''}
>
{props.children}
</div>
)