Skip to content

Commit eccd4bd

Browse files
committed
Set key on thumbnail to prevent showing prev image
1 parent 987e67b commit eccd4bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/post/PostHead.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ const PostHead: React.FC<PostHeadProps> = ({
213213
)}
214214
</div>
215215
{!hideThumbnail && thumbnail && (
216-
<Thumbnail src={optimizeImage(thumbnail, 1024)} alt="post-thumbnail" />
216+
<Thumbnail
217+
src={optimizeImage(thumbnail, 1024)}
218+
alt="post-thumbnail"
219+
key={thumbnail}
220+
/>
217221
)}
218222
<PopupOKCancel
219223
visible={askRemove}

0 commit comments

Comments
 (0)