Skip to content

Commit

Permalink
[master] fix: v3Notify show error (#4338)
Browse files Browse the repository at this point in the history
fix: v3Notify show error

Signed-off-by: miaqiang <[email protected]>
Co-authored-by: miaqiang <[email protected]>
  • Loading branch information
ks-ci-bot and miaqiang authored Nov 7, 2024
1 parent d3eeeea commit ccb1016
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 ccb1016

Please sign in to comment.