Skip to content

Commit 849233a

Browse files
committed
fix(web): show a loading line while T3 Connect account pages load
1 parent 95bbf18 commit 849233a

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎apps/web/src/components/clerk/T3ConnectAccountPages.tsx‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@ const T3ConnectUserProfilePage = lazy(() =>
1414
})),
1515
);
1616

17+
function AccountPageFallback({ label }: { readonly label: string }) {
18+
return (
19+
<p className="py-4 text-xs text-muted-foreground" role="status">
20+
Loading {label}…
21+
</p>
22+
);
23+
}
24+
1725
/** Custom pages in the Clerk account modal, in menu order. */
1826
export const T3_CONNECT_ACCOUNT_PAGES = [
1927
{
2028
label: "Mobile clients",
2129
url: "mobile-clients",
2230
icon: <SmartphoneIcon className="size-4" />,
2331
content: (
24-
<Suspense fallback={null}>
32+
<Suspense fallback={<AccountPageFallback label="mobile clients" />}>
2533
<MobileClientsUserProfilePage />
2634
</Suspense>
2735
),
@@ -31,7 +39,7 @@ export const T3_CONNECT_ACCOUNT_PAGES = [
3139
url: "t3-connect",
3240
icon: <ServerIcon className="size-4" />,
3341
content: (
34-
<Suspense fallback={null}>
42+
<Suspense fallback={<AccountPageFallback label="T3 Connect" />}>
3543
<T3ConnectUserProfilePage />
3644
</Suspense>
3745
),

0 commit comments

Comments
 (0)