import { useQuery } from 'react-query'; import clsx from 'clsx'; import { getStatus } from '@/portainer/services/api/status.service'; import { UpdateNotification } from './UpdateNotifications'; import styles from './Footer.module.css'; export function Footer() { const statusQuery = useStatus(); if (!statusQuery.data) { return null; } const { Edition, Version } = statusQuery.data; return (
{process.env.PORTAINER_EDITION === 'CE' && }
© Portainer {Edition} {Version} {process.env.PORTAINER_EDITION === 'CE' && ( Upgrade )}
); } function useStatus() { return useQuery(['status'], () => getStatus()); }