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':
return (
<Markdown
key={i}
data={x.data}
/>
)
@@ -86,6 +87,7 @@ const Index: NextPage<Props> = props => (
case 'html':
return (
<Html
key={i}
html={x.data}
/>
)
@@ -93,6 +95,7 @@ const Index: NextPage<Props> = props => (
case 'instagram':
return (
<Html
key={i}
html={x.data.embed}
/>
)
@@ -100,13 +103,14 @@ const Index: NextPage<Props> = props => (
case 'youtube':
return (
<Youtube
key={i}
url={x.data.url}
/>
)
case 'image':
return (
<div className="kazimir__image">
<div key={i} className="kazimir__image">
<figure>
<Image
src={x.data.src}
@@ -121,12 +125,12 @@ const Index: NextPage<Props> = props => (
case 'file':
return (
<File {...x.data} />
<File key={i} {...x.data} />
)
default:
return (
<pre>
<pre key={i}>
{JSON.stringify(x)}
</pre>
)