From c6d2507e3e1fc9b676c0a7b8140d8cc78a79ddcd Mon Sep 17 00:00:00 2001 From: Pete Watters <2938440+pete-watters@users.noreply.github.com> Date: Thu, 15 Feb 2024 05:42:31 +0000 Subject: [PATCH] chore: move appVersion and fix bug with sign-out causing crash on fresh install --- src/app/features/container/container.tsx | 12 ++++++++---- .../features/settings/sign-out/sign-out-confirm.tsx | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/features/container/container.tsx b/src/app/features/container/container.tsx index af924df06be..d55b5ee9992 100644 --- a/src/app/features/container/container.tsx +++ b/src/app/features/container/container.tsx @@ -11,6 +11,7 @@ import { RouteUrls } from '@shared/route-urls'; import { closeWindow } from '@shared/utils'; import { useAnalytics, useInitalizeAnalytics } from '@app/common/hooks/analytics/use-analytics'; +import { AppVersion } from '@app/components/app-version'; import { LoadingSpinner } from '@app/components/loading-spinner'; import { CurrentAccountAvatar } from '@app/features/current-account/current-account-avatar'; import { CurrentAccountName } from '@app/features/current-account/current-account-name'; @@ -143,10 +144,13 @@ export function Container() { title={getTitleFromUrl(pathname as RouteUrls)} logo={ !hideLogo() ? ( - navigate(RouteUrls.Home) : undefined} - /> + <> + navigate(RouteUrls.Home) : undefined} + /> + + ) : ( // FIXME get rid of this Box used to position when no logo diff --git a/src/app/features/settings/sign-out/sign-out-confirm.tsx b/src/app/features/settings/sign-out/sign-out-confirm.tsx index 8508fab2c7f..8d41e6414c7 100644 --- a/src/app/features/settings/sign-out/sign-out-confirm.tsx +++ b/src/app/features/settings/sign-out/sign-out-confirm.tsx @@ -20,7 +20,8 @@ export function SignOut({ isShowing = false, onClose }: SignOutProps) { useEffect(() => void analytics.track('sign-out'), [analytics]); const { signOut } = useKeyActions(); const navigate = useNavigate(); - + // FIXME same bug as SwitchAcccount dialog where we call hooks from useWalletType when no wallet yet set + if (!isShowing) return null; return (