version of the front -> TODO refacto and store the front config version in DB

This commit is contained in:
Hugo Lextrait 2023-02-22 15:11:31 +01:00
parent 2d569c0928
commit 7e9d2e9e4b
4 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,7 @@
@import "@Themes/constants.scss";
.root {
position: fixed;
bottom: 16px;
right: 24px;
}

View File

@ -0,0 +1,19 @@
import React from "react";
import classes from "./classes.module.scss";
import VersionFile from "@Front/version.json";
import Typography, { ITypo, ITypoColor } from "../Typography";
type IProps = {};
type IState = {};
export default class Version extends React.Component<IProps, IState> {
public override render(): JSX.Element {
return <div className={classes["root"]}>
<Typography typo={ITypo.P_16} color={ITypoColor.GREY}>
<div>
{VersionFile.version}
</div>
</Typography>
</div>;
}
}

View File

@ -1,6 +1,7 @@
import React, { ReactNode } from "react";
import classes from "./classes.module.scss";
import Header from "@Front/Components/DesignSystem/Header";
import Version from "@Front/Components/DesignSystem/Version";
type IProps = {
title: string;
@ -24,6 +25,7 @@ export default class DefaultTemplate extends React.Component<IProps, IState> {
<div className={classes["root"]}>
<div className={classes["content"]}>{this.props.children}</div>
</div>
<Version />
</>
);

3
src/front/version.json Normal file
View File

@ -0,0 +1,3 @@
{
"version": "v0.0.1"
}