fix(dashboard): render null instead of flashing spinner during plugin load
This commit is contained in:
@@ -81,22 +81,11 @@ function RootRedirect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function UnknownRouteFallback({ pluginsLoading }: { pluginsLoading: boolean }) {
|
function UnknownRouteFallback({ pluginsLoading }: { pluginsLoading: boolean }) {
|
||||||
if (!pluginsLoading) {
|
if (pluginsLoading) {
|
||||||
return <Navigate to="/sessions" replace />;
|
// Render nothing during the plugin-load window — a spinner here would just flash.
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
return <Navigate to="/sessions" replace />;
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="flex min-h-[16rem] min-w-0 items-center justify-center"
|
|
||||||
aria-busy="true"
|
|
||||||
aria-live="polite"
|
|
||||||
>
|
|
||||||
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
||||||
<Spinner />
|
|
||||||
<span>Loading dashboard plugins…</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const CHAT_NAV_ITEM: NavItem = {
|
const CHAT_NAV_ITEM: NavItem = {
|
||||||
|
|||||||
Reference in New Issue
Block a user