import { useState } from 'react';
import { useQuery } from 'react-query';
import clsx from 'clsx';
import { Database, Hash, Server, Tag, Tool } from 'react-feather';
import { DialogOverlay } from '@reach/dialog';
import {
getStatus,
getVersionStatus,
} from '@/portainer/services/api/status.service';
import { Button } from '@@/buttons';
import { UpdateNotification } from './UpdateNotifications';
import styles from './Footer.module.css';
import '@reach/dialog/styles.css';
export function Footer() {
const [showBuildInfo, setShowBuildInfo] = useState(false);
const statusQuery = useStatus();
const versionQuery = useVersionStatus();
if (!statusQuery.data || !versionQuery.data) {
return null;
}
const { Edition, Version } = statusQuery.data;
const { ServerVersion, DatabaseVersion, Build } = versionQuery.data;
function toggleModal() {
setShowBuildInfo(!showBuildInfo);
}
return (
<>
Portainer {Edition}