Skip to content

Commit

Permalink
fix: v3Notify show error
Browse files Browse the repository at this point in the history
Signed-off-by: miaqiang <[email protected]>
  • Loading branch information
miaqiang authored and ks-ci-bot committed Nov 7, 2024
1 parent d3eeeea commit ff8fc28
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 ff8fc28

Please sign in to comment.