From d3a6544bc5fd7b3d2d65494ba1c3155b024a436e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 6 Dec 2022 11:21:12 -0300 Subject: using web-utils in anastasis-webui --- .../src/components/menu/SideBar.tsx | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'packages/anastasis-webui/src/components/menu/SideBar.tsx') diff --git a/packages/anastasis-webui/src/components/menu/SideBar.tsx b/packages/anastasis-webui/src/components/menu/SideBar.tsx index 51e854944..3dac73e04 100644 --- a/packages/anastasis-webui/src/components/menu/SideBar.tsx +++ b/packages/anastasis-webui/src/components/menu/SideBar.tsx @@ -22,7 +22,7 @@ import { BackupStates, RecoveryStates } from "@gnu-taler/anastasis-core"; import { Fragment, h, VNode } from "preact"; import { useAnastasisContext } from "../../context/anastasis.js"; -import { Translate } from "../../i18n/index.js"; +import { useTranslationContext } from "../../context/translation.js"; interface Props { mobile?: boolean; @@ -34,6 +34,7 @@ const VERSION_WITH_HASH = GIT_HASH ? `${VERSION}-${GIT_HASH}` : VERSION; export function Sidebar({ mobile }: Props): VNode { const reducer = useAnastasisContext()!; + const { i18n } = useTranslationContext(); function saveSession(): void { const state = reducer.exportState(); @@ -64,7 +65,7 @@ export function Sidebar({ mobile }: Props): VNode {