diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-28 12:54:21 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-28 12:54:21 -0700 |
commit | c84ec8f37e7d3694376a236f0e9cf4cb69bd4f2d (patch) | |
tree | 7743af182c74544e10316a2d6f6fbc4e30d5658f /extension/react-app/src | |
parent | 4411dc39c1ec51bfc96c4059aa555313e825c2f7 (diff) | |
download | sncontinue-c84ec8f37e7d3694376a236f0e9cf4cb69bd4f2d.tar.gz sncontinue-c84ec8f37e7d3694376a236f0e9cf4cb69bd4f2d.tar.bz2 sncontinue-c84ec8f37e7d3694376a236f0e9cf4cb69bd4f2d.zip |
patch
Diffstat (limited to 'extension/react-app/src')
-rw-r--r-- | extension/react-app/src/components/CodeBlock.tsx | 2 | ||||
-rw-r--r-- | extension/react-app/src/components/StepContainer.tsx | 12 |
2 files changed, 3 insertions, 11 deletions
diff --git a/extension/react-app/src/components/CodeBlock.tsx b/extension/react-app/src/components/CodeBlock.tsx index b0de13ac..508dcc83 100644 --- a/extension/react-app/src/components/CodeBlock.tsx +++ b/extension/react-app/src/components/CodeBlock.tsx @@ -61,7 +61,7 @@ function CopyButton(props: { textToCopy: string; visible: boolean }) { ); } -function CodeBlock(props: { children: string }) { +function CodeBlock(props: { children: React.ReactNode }) { const [result, setResult] = useState<AutoHighlightResult | undefined>( undefined ); diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx index 827d2d5f..02c04548 100644 --- a/extension/react-app/src/components/StepContainer.tsx +++ b/extension/react-app/src/components/StepContainer.tsx @@ -246,18 +246,10 @@ function StepContainer(props: StepContainerProps) { className="overflow-x-scroll" components={{ pre: ({ node, ...props }) => { - return ( - <CodeBlock - children={props.children[0] as string} - ></CodeBlock> - ); + return <CodeBlock children={props.children[0]} />; }, code: ({ node, ...props }) => { - return ( - <StyledCode - children={props.children[0] as string} - ></StyledCode> - ); + return <StyledCode children={props.children[0]} />; }, }} > |