File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import CopyToClipboard from "./CopyToClipboard";
44
55type Props = {
66 language : string ;
7- children : string [ ] ;
7+ code : string [ ] ;
88} ;
99
10- const CodePreview = ( { language = "markdown" , children } : Props ) => {
11- const codeString = children . join ( "\n" ) ;
10+ const CodePreview = ( { language = "markdown" , code } : Props ) => {
11+ const codeString = code . join ( "\n" ) ;
1212
1313 return (
1414 < div className = "code-preview" >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const SnippetModal: React.FC<Props> = ({
2929 < CloseIcon />
3030 </ Button >
3131 </ div >
32- < CodePreview language = { slugify ( language ) } > { snippet . code } </ CodePreview >
32+ < CodePreview language = { slugify ( language ) } code = { snippet . code } / >
3333 < p >
3434 < b > Description: </ b >
3535 { snippet . description }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export type CategoryType = {
1111export type SnippetType = {
1212 title : string ;
1313 description : string ;
14- code : string ;
14+ code : string [ ] ;
1515 tags : string [ ] ;
1616 author : string ;
1717} ;
You can’t perform that action at this time.
0 commit comments