1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/hooks/useInfoPanelState.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
330 B
TypeScript
Raw Normal View History

import { useUIState } from '@/react/hooks/useUIState';
export function useInfoPanelState(panelId: string) {
const uiStateStore = useUIState();
const isVisible = !uiStateStore.dismissedInfoPanels[panelId];
return {
isVisible,
dismiss,
};
function dismiss() {
uiStateStore.dismissInfoPanel(panelId);
}
}