import React from "react"; import Group from "../../../ui/Group/Group"; import { build, getVersion, version } from "../../../api/api"; import Loading from "../../../components/Loading"; import { Helmet } from "react-helmet"; type State = { backend: Unmei.VersionResponse | null } class APMain extends React.Component { state: State = { backend: null } componentDidMount() { getVersion().then(backend => this.setState({ backend })); } render() { const { backend } = this.state; if(!backend) return ; return ( Главное / Админ-панель
Текущая версия сайта: {version} (билд: {build})
Текущая версия API: {backend.version} (билд: {backend.build})
Совпадение версий сборок: {backend.build === build ? 'да' : 'нет'}
); } } export default APMain;