From 07099e7de3c3968703631b3cc056c4b0553ed2ee Mon Sep 17 00:00:00 2001 From: Piotr Gawron <p.gawron@atcomp.pl> Date: Thu, 25 Apr 2024 12:56:46 +0200 Subject: [PATCH] version number should be taken from configuration --- src/components/FunctionalArea/NavBar/NavBar.component.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/FunctionalArea/NavBar/NavBar.component.tsx b/src/components/FunctionalArea/NavBar/NavBar.component.tsx index fd6a3588..71785c29 100644 --- a/src/components/FunctionalArea/NavBar/NavBar.component.tsx +++ b/src/components/FunctionalArea/NavBar/NavBar.component.tsx @@ -6,6 +6,8 @@ import { useAppDispatch } from '@/redux/hooks/useAppDispatch'; import { openLegend } from '@/redux/legend/legend.slice'; import { openPluginsDrawer } from '@/redux/plugins/plugins.slice'; import { IconButton } from '@/shared/IconButton'; +import { store } from '@/redux/store'; + import Image from 'next/image'; export const NavBar = (): JSX.Element => { @@ -28,6 +30,9 @@ export const NavBar = (): JSX.Element => { dispatch(openLegend()); }; + const configuration = store.getState().configuration.main.data; + const version = configuration ? `(v${configuration.version})` : ''; + return ( <div className="flex min-h-full w-[88px] flex-col items-center justify-between overflow-y-auto bg-cultured py-8"> <div data-testid="nav-buttons"> @@ -56,7 +61,7 @@ export const NavBar = (): JSX.Element => { <span className="h-16 w-14 text-center text-[8px] leading-4"> Powered by: MINERVA Platform{' '} <a href={MINERVA_WEBSITE_URL} target="_blank"> - (v16.0.8) + {version} </a> </span> </div> -- GitLab