Skip to content

Commit

Permalink
Revert "update deprecated function"
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Sep 2, 2020
1 parent 9376f44 commit c9b6ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ export const DarkMode = ({ api }: DarkModeProps) => {
channel.on(STORY_CHANGED, renderTheme);
channel.on(SET_STORIES, renderTheme);
channel.on(DOCS_RENDERED, renderTheme);
prefersDark.addEventListener('change', prefersDarkUpdate);
prefersDark.addListener(prefersDarkUpdate);

return () => {
channel.removeListener(STORY_CHANGED, renderTheme);
channel.removeListener(SET_STORIES, renderTheme);
channel.removeListener(DOCS_RENDERED, renderTheme);
prefersDark.removeEventListener('change', prefersDarkUpdate);
prefersDark.removeListener(prefersDarkUpdate);
};
});

Expand Down

0 comments on commit c9b6ea6

Please sign in to comment.