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

View File

@ -25,7 +25,7 @@ server {
proxy_hide_header 'Access-Control-Allow-Methods'; proxy_hide_header 'Access-Control-Allow-Methods';
add_header 'Access-Control-Allow-Methods' '*' always; add_header 'Access-Control-Allow-Methods' '*' always;
proxy_pass https://backend:8000; proxy_pass http://backend:8000/;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;