From 1adad6fde5887422e33c9ede998d37e30f3237c1 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 23 May 2026 19:35:50 +0200 Subject: [PATCH] Add loading indicator to ProfilesPage while user data is being fetched --- web/components/profiles/profiles-home.tsx | 13 ------------- web/pages/index.tsx | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/web/components/profiles/profiles-home.tsx b/web/components/profiles/profiles-home.tsx index 0a0f238b..3b8f6b77 100644 --- a/web/components/profiles/profiles-home.tsx +++ b/web/components/profiles/profiles-home.tsx @@ -217,19 +217,6 @@ export function ProfilesHome() { return (
- {!user && ( - -
-
-

- {t('profiles.loading_dashboard', 'Loading dashboard…')} -

-

- {t('profiles.loading_dashboard_desc', 'Hang tight while we set things up for you.')} -

-
- - )} {showSignupBanner && user && (
diff --git a/web/pages/index.tsx b/web/pages/index.tsx index b4cd21b4..ef1f8263 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -4,6 +4,7 @@ import {Col} from 'web/components/layout/col' import {PageBase} from 'web/components/page-base' import {ProfilesHome} from 'web/components/profiles/profiles-home' import {useUser} from 'web/hooks/use-user' +import {useT} from 'web/lib/locale' // To simulate downtime, you need the error to happen at runtime, not at build time. // That means the page must be server-rendered, not statically generated. @@ -13,9 +14,24 @@ import {useUser} from 'web/hooks/use-user' export default function ProfilesPage() { const user = useUser() + const t = useT() if (user === undefined) { - return + return ( + + +
+
+

+ {t('profiles.loading_dashboard', 'Loading dashboard…')} +

+ {/*

*/} + {/* {t('profiles.loading_dashboard_desc', 'Hang tight while we set things up for you.')}*/} + {/*

*/} +
+ + + ) } debug('user:', user)