mirror of https://github.com/portainer/portainer
17 lines
330 B
TypeScript
17 lines
330 B
TypeScript
![]() |
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);
|
||
|
}
|
||
|
}
|