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 | 8159e6371efb3501d23f6103da4b7489a6c86d93 (patch) | |
| tree | 54dae95b3732f2e0c83b8a3458a786fa923239a8 /extension/react-app/src | |
| parent | 1610328606d0f609e491bf935517cc8798c1fb2a (diff) | |
| download | sncontinue-8159e6371efb3501d23f6103da4b7489a6c86d93.tar.gz sncontinue-8159e6371efb3501d23f6103da4b7489a6c86d93.tar.bz2 sncontinue-8159e6371efb3501d23f6103da4b7489a6c86d93.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]} />;                  },                }}              >  | 
