Skip to content

Commit

Permalink
Merge pull request #24146 from martinnabhan/bugfix/nextjs-image-conte…
Browse files Browse the repository at this point in the history
…xt-2

NextJS: Fix Image Context re-use via singleton
  • Loading branch information
valentinpalkovic authored Oct 5, 2023
2 parents 9139e90 + 38de6fc commit 33e564e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
7 changes: 1 addition & 6 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./image-context": {
"types": "./dist/image-context.d.ts",
"require": "./dist/image-context.js",
"import": "./dist/image-context.mjs"
},
"./dist/image-context": {
"types": "./dist/image-context.d.ts",
"require": "./dist/image-context.js",
"require": "./dist/image-context.mjs",
"import": "./dist/image-context.mjs"
},
"./preset": {
Expand Down
6 changes: 0 additions & 6 deletions code/frameworks/nextjs/template/stories/Image.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ export const Lazy = {
width: 50,
height: 50,
},
parameters: {
// ignoring in Chromatic to avoid inconsistent snapshots since the image is sometimes not loaded in time
chromatic: { disableSnapshot: true },
},
decorators: [
(Story) => (
<>
Expand All @@ -78,8 +74,6 @@ export const Lazy = {
export const Eager = {
...Lazy,
parameters: {
// ignoring in Chromatic to avoid inconsistent snapshots since the image is sometimes not loaded in time
chromatic: { disableSnapshot: true },
nextjs: {
image: {
loading: 'eager',
Expand Down

0 comments on commit 33e564e

Please sign in to comment.