Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/AdminGuesser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const AdminGuesser = ({
defaultTheme,
layout = Layout,
loginPage = LoginPage,
loading: loadingPage,
loading: LoadingPage = Loading,
theme = defaultLightTheme,
darkTheme = defaultDarkTheme,
// Other props
Expand Down Expand Up @@ -97,7 +97,7 @@ const AdminGuesser = ({
);

if (loading) {
return <Loading />;
return <LoadingPage />;
Comment on lines 99 to +100
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior change (using the caller-provided loading component during the initial introspection load) isn’t covered by tests. Current AdminGuesser.test.tsx uses shallow rendering, so it won’t run useEffect or exercise the if (loading) return <LoadingPage /> branch with a custom loading prop. Add a test that mounts AdminGuesser (e.g., with @testing-library/react) and asserts that a custom loading component is rendered before dataProvider.introspect() resolves.

Copilot uses AI. Check for mistakes.
}

return (
Expand All @@ -120,7 +120,7 @@ const AdminGuesser = ({
dataProvider={dataProvider}
layout={layout}
loginPage={loginPage}
loadingPage={loadingPage}
loadingPage={LoadingPage}
theme={theme}
error={error}
{...rest}>
Expand Down