fix(org-site): stabilize landing-page nav auth button
The auth button derived from stores that hydrate in stages, so it flashed through Login -> Dashboard -> Go to LMS as isLoggedIn and the role/basePath settled at different times. Gate the label on appInitApi.isInitializedAndReady so it only renders once the account (and thus role) has loaded, and show a spinner in the button while a logged-in user's experience resolves. Add separate loading and disabled flags to authAction and wire them through all theme navs.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
authAction?: {
|
||||
label: string;
|
||||
href: string;
|
||||
loading?: boolean;
|
||||
disabled?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -58,6 +60,8 @@
|
||||
<div class="ui:flex ui:items-center ui:gap-4">
|
||||
<Button
|
||||
href={authAction.href}
|
||||
loading={authAction.loading}
|
||||
disabled={authAction.disabled}
|
||||
size="sm"
|
||||
class="ui:rounded-md ui:px-4 ui:font-medium ui:bg-[var(--landing-accent)] ui:text-[var(--landing-accent-fg)] ui:hover:opacity-90"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user