Skip to content

Commit

Permalink
fix errors in dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed May 17, 2024
1 parent 5cf6aa9 commit ffb0af4
Show file tree
Hide file tree
Showing 4 changed files with 2,279 additions and 253 deletions.
9 changes: 5 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"private": true,
"scripts": {
"build": "next build && playroom build",
"build:playroom": "playroom build",
"build:playroom": "NODE_OPTIONS='---openssl-legacy-provider' build",
"build:next": "next build",
"export": "next export",
"clean": "rimraf .next public/playroom",
"dev": "NODE_OPTIONS='--inspect' next dev & playroom start",
"dev": "NODE_OPTIONS='--inspect' next dev & NODE_OPTIONS='--openssl-legacy-provider' playroom start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"lint:types": "tsc --noEmit",
Expand All @@ -19,17 +19,18 @@
"@reach/skip-nav": "^0.16.0",
"@sindresorhus/slugify": "^2.1.0",
"copy-to-clipboard": "^3.3.1",
"eslint-config-next": "^13.5.6",
"gray-matter": "^4.0.3",
"lodash": "^4.17.21",
"next": "12.3.0",
"next": "13.5.6",
"next-mdx-remote": "^3.0.6",
"nookies": "^2.5.2",
"playroom": "^0.28.1",
"prism-react-renderer": "^1.2.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-element-to-jsx-string": "^14.3.4",
"react-live": "3.1.1",
"react-live": "4.1.6",
"react-transition-state": "^1.1.4",
"styled-components": "5.3.6"
},
Expand Down
21 changes: 14 additions & 7 deletions docs/src/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,20 @@ export const CodeBlock = ({
<CopyButton content={code} />
</CopyButtonContainer>

{tokens.map((line, i) => (
<LineContainer key={i} {...getLineProps({ line, key: i })}>
{line.map((token, key) => (
<Token key={key} {...getTokenProps({ token, key })} />
))}
</LineContainer>
))}
{tokens.map((line, i) => {
const { key, ...lineProps } = getLineProps({ line, key: i })
return (
<LineContainer key={i} {...lineProps}>
{line.map((token, j) => {
const { key: tokenKey, ...tokenProps } = getTokenProps({
token,
key: j,
})
return <Token key={tokenKey} {...tokenProps} />
})}
</LineContainer>
)
})}
</Pre>
)}
{/* eslint-enable react/no-array-index-key */}
Expand Down
1 change: 1 addition & 0 deletions docs/src/components/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const Link = ({
href={href}
passHref
prefetch={canPrefetch(href) ? undefined : false}
legacyBehavior
>
<a className={className}>{children}</a>
</NextLink>
Expand Down
Loading

0 comments on commit ffb0af4

Please sign in to comment.