Skip to content

Commit

Permalink
fix: v3Notify show error
Browse files Browse the repository at this point in the history
  • Loading branch information
miaqiang committed Nov 6, 2024
1 parent 8e41952 commit bdcd3bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/components/Layouts/BaseLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { StylesConstants, useGlobalStyles } from '@ks-console/shared';
import Toolbox from '../../../containers/Toolbox';
import Header from '../Header';
import { Main } from './styles';
import v3Notify from './v3Notify';

const GlobalStyle = createGlobalStyle<{ $navbarHeight?: number; $licenseTipHeight?: number }>`
:root {
Expand Down Expand Up @@ -55,7 +56,9 @@ export default function BaseLayout() {
window.history.pushState('', '', url);
}
});
bus.$on('notify', v3Notify);
return () => {
bus.$off('notify', v3Notify);
document.removeEventListener('click', eventer);
};
}, []);
Expand Down

0 comments on commit bdcd3bf

Please sign in to comment.