File tree 3 files changed +5
-5
lines changed
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";
4
4
5
5
type Props = {
6
6
language : string ;
7
- children : string [ ] ;
7
+ code : string [ ] ;
8
8
} ;
9
9
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" ) ;
12
12
13
13
return (
14
14
< div className = "code-preview" >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const SnippetModal: React.FC<Props> = ({
29
29
< CloseIcon />
30
30
</ Button >
31
31
</ div >
32
- < CodePreview language = { slugify ( language ) } > { snippet . code } </ CodePreview >
32
+ < CodePreview language = { slugify ( language ) } code = { snippet . code } / >
33
33
< p >
34
34
< b > Description: </ b >
35
35
{ snippet . description }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export type CategoryType = {
11
11
export type SnippetType = {
12
12
title : string ;
13
13
description : string ;
14
- code : string ;
14
+ code : string [ ] ;
15
15
tags : string [ ] ;
16
16
author : string ;
17
17
} ;
You can’t perform that action at this time.
0 commit comments