summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-18 18:57:51 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-18 18:57:51 -0700
commitdeca77889cfc8eaa4065694f113525eda365e5d0 (patch)
treed551620f0bc5ef2b54e5b55807541c8959accdc5 /extension/react-app/src/components
parente5706b993030ed02c1da4ffcff1a41498faf5ab7 (diff)
downloadsncontinue-deca77889cfc8eaa4065694f113525eda365e5d0.tar.gz
sncontinue-deca77889cfc8eaa4065694f113525eda365e5d0.tar.bz2
sncontinue-deca77889cfc8eaa4065694f113525eda365e5d0.zip
correctly get string from children
Diffstat (limited to 'extension/react-app/src/components')
-rw-r--r--extension/react-app/src/components/StyledCode.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/extension/react-app/src/components/StyledCode.tsx b/extension/react-app/src/components/StyledCode.tsx
index 2f8428dc..66135d65 100644
--- a/extension/react-app/src/components/StyledCode.tsx
+++ b/extension/react-app/src/components/StyledCode.tsx
@@ -2,13 +2,13 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { synthwave84 } from "react-syntax-highlighter/dist/esm/styles/prism";
interface StyledCodeProps {
- children: string;
+ children: string;
}
-const StyledCode = (props: (StyledCodeProps)) => (
+const StyledCode = (props: StyledCodeProps) => (
<SyntaxHighlighter style={synthwave84}>
- {props.children}
+ {(props.children as any).props.children}
</SyntaxHighlighter>
);
-export default StyledCode; \ No newline at end of file
+export default StyledCode;