Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/frameworks/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const configureConfig = async ({
const nextConfig = await resolveNextConfig({ baseConfig, nextConfigPath, configDir });

addScopedAlias(baseConfig, 'next/config');
addScopedAlias(baseConfig, 'react', 'next/dist/compiled/react');
addScopedAlias(baseConfig, 'react-dom', 'next/dist/compiled/react-dom');
setupRuntimeConfig(baseConfig, nextConfig);

return nextConfig;
Expand Down
11 changes: 1 addition & 10 deletions code/ui/blocks/src/components/Story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ const InlineStory: FunctionComponent<InlineStoryProps> = (props) => {
};
}, [autoplay, renderStoryToElement, story]);

// We do this so React doesn't complain when we replace the span in a secondary render
const htmlContents = `<span></span>`;

if (error) {
return (
<pre>
Expand All @@ -83,13 +80,7 @@ const InlineStory: FunctionComponent<InlineStoryProps> = (props) => {
)} { min-height: ${height}; transform: translateZ(0); overflow: auto }`}</style>
) : null}
{showLoader && <StorySkeleton />}
<div
ref={storyRef}
id={`${storyBlockIdFromId(props)}-inner`}
data-name={story.name}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: htmlContents }}
/>
<div ref={storyRef} id={`${storyBlockIdFromId(props)}-inner`} data-name={story.name} />
</>
);
};
Expand Down