Re implement asset fetching
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import React, { lazy, Suspense } from "react";
|
||||
import React from "react";
|
||||
import Fallback from "../../dist/login";
|
||||
import type { KcContext } from "./kcContext";
|
||||
import { useI18n } from "./i18n";
|
||||
@ -35,23 +35,14 @@ export default function KcApp(props: { kcContext: KcContext }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense>
|
||||
{(() => {
|
||||
switch (kcContext.pageId) {
|
||||
default:
|
||||
return (
|
||||
<Fallback
|
||||
{...{
|
||||
kcContext,
|
||||
i18n,
|
||||
Template,
|
||||
UserProfileFormFields
|
||||
}}
|
||||
doUseDefaultCss={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
})()}
|
||||
</Suspense>
|
||||
<Fallback
|
||||
{...{
|
||||
kcContext,
|
||||
i18n,
|
||||
Template,
|
||||
UserProfileFormFields
|
||||
}}
|
||||
doUseDefaultCss={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -15,7 +15,11 @@ export function createPageStory<PageId extends KcContext["pageId"]>(params: { pa
|
||||
overrides
|
||||
});
|
||||
|
||||
return <KcApp kcContext={kcContextMock} />;
|
||||
return (
|
||||
<React.StrictMode>
|
||||
<KcApp kcContext={kcContextMock} />
|
||||
</React.StrictMode>
|
||||
);
|
||||
}
|
||||
|
||||
return { PageStory };
|
||||
|
Reference in New Issue
Block a user