diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-22 15:09:39 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-22 15:09:39 +0200 |
| commit | 321dae4a47594af83269fa560b375965d7f35763 (patch) | |
| tree | 28392e486bb8c99c231e767d1532935c5ebc1b94 /src/components/molecules/layout | |
| parent | 70bd37fe14d4e0c1538291fa97b0522ab6d20941 (diff) | |
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.
Diffstat (limited to 'src/components/molecules/layout')
| -rw-r--r-- | src/components/molecules/layout/branding.stories.tsx | 5 | ||||
| -rw-r--r-- | src/components/molecules/layout/card.stories.tsx | 1 |
2 files changed, 0 insertions, 6 deletions
diff --git a/src/components/molecules/layout/branding.stories.tsx b/src/components/molecules/layout/branding.stories.tsx index d2e0694..94bb166 100644 --- a/src/components/molecules/layout/branding.stories.tsx +++ b/src/components/molecules/layout/branding.stories.tsx @@ -56,7 +56,6 @@ export default { required: true, }, }, - unoptimized: { table: { disable: true } }, withLink: { control: { type: 'boolean', @@ -85,8 +84,6 @@ export const Default = Template.bind({}); Default.args = { title: 'Website title', photo: 'http://placeimg.com/640/480', - // @ts-ignore - Needed because of the placeholder image. - unoptimized: true, }; /** @@ -97,6 +94,4 @@ WithBaseline.args = { title: 'Website title', baseline: 'Maiores corporis qui', photo: 'http://placeimg.com/640/480', - // @ts-ignore - Needed because of the placeholder image. - unoptimized: true, }; diff --git a/src/components/molecules/layout/card.stories.tsx b/src/components/molecules/layout/card.stories.tsx index 2e99bbb..0ad42c0 100644 --- a/src/components/molecules/layout/card.stories.tsx +++ b/src/components/molecules/layout/card.stories.tsx @@ -113,7 +113,6 @@ const cover = { height: 480, src: 'http://placeimg.com/640/480', width: 640, - unoptimized: true, }; const meta = { |
