/* * Copyright (C) Contributors to the Suwayomi project * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { useContext, useEffect } from 'react'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; import { useTranslation } from 'react-i18next'; import requestManager from '@/lib/requests/RequestManager.ts'; import ListItemLink from '@/components/util/ListItemLink'; import NavbarContext, { useSetDefaultBackTo } from '@/components/context/NavbarContext'; import LoadingPlaceholder from '@/components/util/LoadingPlaceholder'; export default function About() { const { t } = useTranslation(); const { setTitle, setAction } = useContext(NavbarContext); useEffect(() => { setTitle(t('settings.about.title')); setAction(null); }, [t]); const { data } = requestManager.useGetAbout(); const about = data?.about; useSetDefaultBackTo('settings'); if (about === undefined) { return ; } const version = () => { if (about.buildType === 'Stable') return `${about.version}`; return `${about.version}-${about.revision}`; }; const buildTime = () => new Date(about.buildTime * 1000).toUTCString(); return ( ); }