diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-18 17:50:57 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-18 17:50:57 -0300 |
commit | e9c6b105d18f142cf4d4b203e734513df1e5021c (patch) | |
tree | 8719c58dc144ab4e64694dc00d4dccd563b8a13e /packages/merchant-backoffice-ui/src/Application.tsx | |
parent | 421b5c0acfa310fcb7f1893bf81e38f2876e1cbf (diff) | |
download | wallet-core-e9c6b105d18f142cf4d4b203e734513df1e5021c.tar.xz |
update config from merchant
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> |