diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/Application.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/Application.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/Application.tsx b/packages/merchant-backoffice-ui/src/Application.tsx index 0c509ef45..27ae26de5 100644 --- a/packages/merchant-backoffice-ui/src/Application.tsx +++ b/packages/merchant-backoffice-ui/src/Application.tsx @@ -61,10 +61,10 @@ function ApplicationStatusRoutes(): VNode { const result = useBackendConfig(); const { i18n } = useTranslationContext(); - const { currency, version } = result.ok && result.data + const configData = result.ok && result.data ? result.data - : { currency: "unknown", version: "unknown" }; - const ctx = useMemo(() => ({ currency, version }), [currency, version]); + : undefined; + const ctx = useMemo(() => (configData), [configData]); if (!result.ok) { if (result.loading) return <Loading />; @@ -159,7 +159,7 @@ function ApplicationStatusRoutes(): VNode { return ( <div class="has-navbar-fixed-top"> - <ConfigContextProvider value={ctx}> + <ConfigContextProvider value={ctx!}> <ApplicationReadyRoutes /> </ConfigContextProvider> </div> |