import React from 'react'; import { useTranslation } from 'next-i18next'; import { toastError } from '~/client/util/apiNotification'; import { apiv3Post } from '~/client/util/apiv3-client'; import { useCurrentUser } from '~/stores/context'; const MaintenanceModeContent = () => { const { t } = useTranslation(); const { data: currentUser } = useCurrentUser(); const logoutHandler = async() => { try { await apiv3Post('/logout'); window.location.reload(); } catch (err) { toastError(err); } }; return (
{ t('maintenance_mode.admin_page') }
)} {currentUser != null ? ( ) : ( ) }