From 316961ecbeb9a58a270cd0b9ff6de8c1d35fdd61 Mon Sep 17 00:00:00 2001 From: Niaz Date: Sun, 17 Mar 2024 12:52:08 +0100 Subject: [PATCH] Show image tag backend version on hover --- src/components/menubars/SideMenuNarrow.tsx | 18 ++++++++++-------- src/store/util/util.zod.ts | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/menubars/SideMenuNarrow.tsx b/src/components/menubars/SideMenuNarrow.tsx index 1d4e17ff..afed3353 100644 --- a/src/components/menubars/SideMenuNarrow.tsx +++ b/src/components/menubars/SideMenuNarrow.tsx @@ -36,7 +36,7 @@ export function SideMenuNarrow(): JSX.Element { const [active, setActive] = useState("/"); const { data: storageStats, isLoading } = useFetchStorageStatsQuery(); - const { data: imageTag } = useFetchImageTagQuery(); + const { data: imageInfos } = useFetchImageTagQuery(); const { t } = useTranslation(); const matches = useMediaQuery("(min-width: 700px)"); @@ -140,13 +140,15 @@ export function SideMenuNarrow(): JSX.Element { )}
- - {imageTag?.image_tag - ? t("version", { - version: imageTag?.image_tag, - }) - : ""} - + + + {imageInfos?.image_tag + ? t("version", { + version: imageInfos?.image_tag, + }) + : ""} + +
diff --git a/src/store/util/util.zod.ts b/src/store/util/util.zod.ts index 5079f22d..cc967493 100644 --- a/src/store/util/util.zod.ts +++ b/src/store/util/util.zod.ts @@ -17,4 +17,5 @@ export type ImageTagResponseType = z.infer; export const ImageTagResponse = z.object({ image_tag: z.string(), + git_hash: z.string(), });