summaryrefslogtreecommitdiff
path: root/extension/react-app/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-28 12:54:21 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-28 12:54:21 -0700
commitc84ec8f37e7d3694376a236f0e9cf4cb69bd4f2d (patch)
tree7743af182c74544e10316a2d6f6fbc4e30d5658f /extension/react-app/src
parent4411dc39c1ec51bfc96c4059aa555313e825c2f7 (diff)
downloadsncontinue-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.tsx2
-rw-r--r--extension/react-app/src/components/StepContainer.tsx12
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]} />;
},
}}
>