slug page missing key prop

This commit is contained in:
tmshv committed 2021-02-16 21:44:14 +03:00
1 parent 30e7706f79
commit 3961d4ae90
1 file changed
+7 -3
+7 -3
View File
@@ -79,6 +79,7 @@ const Index: NextPage<Props> = props => (
case 'text': case 'text':
return ( return (
<Markdown <Markdown
key={i}
data={x.data} data={x.data}
/> />
) )
@@ -86,6 +87,7 @@ const Index: NextPage<Props> = props => (
case 'html': case 'html':
return ( return (
<Html <Html
key={i}
html={x.data} html={x.data}
/> />
) )
@@ -93,6 +95,7 @@ const Index: NextPage<Props> = props => (
case 'instagram': case 'instagram':
return ( return (
<Html <Html
key={i}
html={x.data.embed} html={x.data.embed}
/> />
) )
@@ -100,13 +103,14 @@ const Index: NextPage<Props> = props => (
case 'youtube': case 'youtube':
return ( return (
<Youtube <Youtube
key={i}
url={x.data.url} url={x.data.url}
/> />
) )
case 'image': case 'image':
return ( return (
<div className="kazimir__image"> <div key={i} className="kazimir__image">
<figure> <figure>
<Image <Image
src={x.data.src} src={x.data.src}
@@ -121,12 +125,12 @@ const Index: NextPage<Props> = props => (
case 'file': case 'file':
return ( return (
<File {...x.data} /> <File key={i} {...x.data} />
) )
default: default:
return ( return (
<pre> <pre key={i}>
{JSON.stringify(x)} {JSON.stringify(x)}
</pre> </pre>
) )