/* * 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 React, { useContext, useEffect } from 'react'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; import ListItemLink from 'components/util/ListItemLink'; import NavbarContext from 'components/context/NavbarContext'; import LoadingPlaceholder from 'components/util/LoadingPlaceholder'; import { useTranslation } from 'react-i18next'; import requestManager from 'lib/RequestManager'; export default function About() { const { t } = useTranslation(); const { setTitle, setAction } = useContext(NavbarContext); useEffect(() => { setTitle(t('settings.about.title')); setAction(null); }, [t]); const { data: about } = requestManager.useGetAbout(); 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 ( ); }