Using <Suspense /> and React.lazy()

This commit is contained in:
garronej
2022-07-29 01:31:55 +02:00
parent 0612b2d0a4
commit 449f100bc0
22 changed files with 135 additions and 90 deletions

View File

@ -1,5 +1,5 @@
import { useState, memo } from "react";
import { Template } from "./Template";
import Template from "./Template";
import type { KcProps } from "./KcProps";
import type { KcContextBase } from "../getKcContext/KcContextBase";
import { getMsg } from "../i18n";
@ -7,7 +7,7 @@ import { useCssAndCx } from "tss-react";
import { useConstCallback } from "powerhooks/useConstCallback";
import type { FormEventHandler } from "react";
export const Login = memo(({ kcContext, ...props }: { kcContext: KcContextBase.Login } & KcProps) => {
const Login = memo(({ kcContext, ...props }: { kcContext: KcContextBase.Login } & KcProps) => {
const { social, realm, url, usernameEditDisabled, login, auth, registrationDisabled } = kcContext;
const { msg, msgStr } = getMsg(kcContext);
@ -191,3 +191,5 @@ export const Login = memo(({ kcContext, ...props }: { kcContext: KcContextBase.L
/>
);
});
export default Login;