Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
viewMode === previousViewMode &&
kind === previousKind &&
name === previousStory
) {
addons.getChannel().emit(Events.STORY_UNCHANGED, {
id,
revision,
kind,
name,
viewMode,
});
return;
}
if (!forceRender && previousKind && previousStory) {
addons.getChannel().emit(Events.STORY_CHANGED, id);
}
if (viewMode === 'docs') {
const NoDocs = () => <div style="{{">No docs found</div>;
const StoryDocs = (parameters && parameters.docs) || NoDocs;
ReactDOM.render(, document.getElementById('root'));
} else if (!viewMode || viewMode === 'story') {
if (getDecorated) {
render(renderContext);
addons.getChannel().emit(Events.STORY_RENDERED, id);
} else {
showNopreview();
addons.getChannel().emit(Events.STORY_MISSING, id);
}
}