From 321dae4a47594af83269fa560b375965d7f35763 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 22 May 2022 15:09:39 +0200 Subject: fix: render all images unoptimized in Storybook There is a bug with next/image and Storybook. I was manually adding `unoptimized` to images. Instead we can use a workaround by adding an extra config in Storybook `preview.js` file. --- src/components/organisms/layout/cards-list.test.tsx | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/components/organisms/layout/cards-list.test.tsx') diff --git a/src/components/organisms/layout/cards-list.test.tsx b/src/components/organisms/layout/cards-list.test.tsx index 7d98844..8558fa6 100644 --- a/src/components/organisms/layout/cards-list.test.tsx +++ b/src/components/organisms/layout/cards-list.test.tsx @@ -9,8 +9,6 @@ const items: CardsListItem[] = [ src: 'http://placeimg.com/640/480', width: 640, height: 480, - // @ts-ignore - Needed because of the placeholder image. - unoptimized: true, }, meta: { thematics: ['Velit', 'Ex', 'Alias'] }, tagline: 'Molestias ut error', @@ -24,8 +22,6 @@ const items: CardsListItem[] = [ src: 'http://placeimg.com/640/480', width: 640, height: 480, - // @ts-ignore - Needed because of the placeholder image. - unoptimized: true, }, meta: { thematics: ['Voluptas'] }, tagline: 'Quod vel accusamus', @@ -39,8 +35,6 @@ const items: CardsListItem[] = [ src: 'http://placeimg.com/640/480', width: 640, height: 480, - // @ts-ignore - Needed because of the placeholder image. - unoptimized: true, }, meta: { thematics: ['Quisquam', 'Quia', 'Sapiente', 'Perspiciatis'], -- cgit v1.2.3