Commit feb07f2c by Moorthy G

feat(.storybook/preview.js): setup next/image fallback

parent 8653b3bf
import * as NextImage from 'next/image';
import '!style-loader!css-loader!sass-loader!@styles/global.scss';
export const parameters = {
......@@ -16,3 +17,10 @@ export const parameters = {
}
}
};
/** set a fallback for next/image */
const OriginalNextImage = NextImage.default;
Object.defineProperty(NextImage, 'default', {
configurable: true,
value: (props) => <OriginalNextImage {...props} unoptimized />
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment