import { useQuery } from 'react-query'; import clsx from 'clsx'; import { getVersionStatus } from '@/portainer/services/api/status.service'; import { useUIState } from '@/portainer/hooks/UIStateProvider'; import { Icon } from '@@/Icon'; import styles from './UpdateNotifications.module.css'; export function UpdateNotification() { const [uiState, setUIState] = useUIState(); const query = useUpdateNotification(); if (!query.data || !query.data.UpdateAvailable) { return null; } const { LatestVersion } = query.data; if ( uiState?.dismissedUpdateVersion?.length > 0 && LatestVersion?.length > 0 && uiState?.dismissedUpdateVersion === LatestVersion ) { return null; } return (