From 7e9d2e9e4b2a0172e6da49c8bdf3bd5b52657697 Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Wed, 22 Feb 2023 15:11:31 +0100 Subject: [PATCH] :sparkles: version of the front -> TODO refacto and store the front config version in DB --- .../DesignSystem/Version/classes.module.scss | 7 +++++++ .../components/DesignSystem/Version/index.tsx | 19 +++++++++++++++++++ .../LayoutTemplates/DefaultTemplate/index.tsx | 2 ++ src/front/version.json | 3 +++ 4 files changed, 31 insertions(+) create mode 100644 src/front/components/DesignSystem/Version/classes.module.scss create mode 100644 src/front/components/DesignSystem/Version/index.tsx create mode 100644 src/front/version.json diff --git a/src/front/components/DesignSystem/Version/classes.module.scss b/src/front/components/DesignSystem/Version/classes.module.scss new file mode 100644 index 00000000..10dc5ca8 --- /dev/null +++ b/src/front/components/DesignSystem/Version/classes.module.scss @@ -0,0 +1,7 @@ +@import "@Themes/constants.scss"; + +.root { + position: fixed; + bottom: 16px; + right: 24px; +} diff --git a/src/front/components/DesignSystem/Version/index.tsx b/src/front/components/DesignSystem/Version/index.tsx new file mode 100644 index 00000000..dc7ab791 --- /dev/null +++ b/src/front/components/DesignSystem/Version/index.tsx @@ -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 { + public override render(): JSX.Element { + return
+ +
+ {VersionFile.version} +
+
+
; + } +} diff --git a/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx b/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx index 2d99de76..23a8600b 100644 --- a/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx +++ b/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx @@ -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 {
{this.props.children}
+ ); diff --git a/src/front/version.json b/src/front/version.json new file mode 100644 index 00000000..81e35677 --- /dev/null +++ b/src/front/version.json @@ -0,0 +1,3 @@ +{ + "version": "v0.0.1" +}