checkpoint

This commit is contained in:
2024-04-13 09:59:12 +03:00
parent 1a19764637
commit e80bd291c5
2 changed files with 14 additions and 7 deletions

View File

@ -52,6 +52,7 @@ const AuthModal = (props: {
.then(() => props.setOpen(false))
.then(() => navigate("/dashboard"))
.catch(() => messageApi.error(tr("Login failed!")));
loginForm.resetFields();
};
const submitRegisterForm = (formData: {
@ -94,12 +95,18 @@ const AuthModal = (props: {
spinning={isLoggingIn || isRegistering}
indicator={<LoadingOutlined style={{ fontSize: 36 }} spin />}
>
<Menu
onClick={(e) => setCurrent(e.key)}
mode="horizontal"
selectedKeys={[current]}
items={items}
/>
<div
style={{ display: "flex", width: "100%", justifyContent: "center" }}
>
<Menu
onClick={(e) => setCurrent(e.key)}
mode="horizontal"
selectedKeys={[current]}
items={items}
style={{ width: "fit-content" }}
disabledOverflow={true}
/>
</div>
<br />
{current === "register" ? (
<Form