Files
SCM-Manager/scm-ui/src/admin/containers/AdminDetails.js

43 lines
880 B
JavaScript
Raw Normal View History

2019-06-19 09:58:17 +02:00
// @flow
import React from "react";
2019-07-03 09:02:44 +02:00
import { connect } from "react-redux";
2019-06-19 09:58:17 +02:00
import { translate } from "react-i18next";
2019-07-03 09:02:44 +02:00
import { Loading, Title, Subtitle } from "@scm-manager/ui-components";
import { getAppVersion } from "../../modules/indexResource";
2019-06-19 09:58:17 +02:00
type Props = {
loading: boolean,
error: Error,
version: string,
2019-06-19 09:58:17 +02:00
// context objects
t: string => string
};
class AdminDetails extends React.Component<Props> {
render() {
const { t, loading } = this.props;
if (loading) {
return <Loading />;
}
2019-07-03 09:02:44 +02:00
return (
<>
<Title title={t("admin.information.currentAppVersion")} />
<Subtitle subtitle={this.props.version} />
</>
);
2019-06-19 09:58:17 +02:00
}
}
const mapStateToProps = (state: any) => {
const version = getAppVersion(state);
return {
version
};
};
export default connect(mapStateToProps)(translate("admin")(AdminDetails));