Skip to content

Commit

Permalink
fix: revert SELECT_STORY
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Aug 1, 2020
1 parent 7ce5603 commit a80182c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions misc/storybook-custom-docs/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import addons from '@storybook/addons';
import { SET_CURRENT_STORY } from '@storybook/core-events';
import { ConfigApi } from '@storybook/client-api';
import { UPDATE_STORY_CONTEXT } from './types';
export * from './types';
Expand Down Expand Up @@ -54,13 +53,10 @@ export const useStoryId = () => {
setStoryId(id);
}
};

channel.on(SET_CURRENT_STORY, onStoryChange);
channel.on(UPDATE_STORY_CONTEXT, onStoryChange);

return () => {
channel.off(UPDATE_STORY_CONTEXT, onStoryChange);
channel.off(SET_CURRENT_STORY, onStoryChange);
};
}, [channel]);
return storyId;
Expand Down

0 comments on commit a80182c

Please sign in to comment.