This commit is contained in:
Mikola 2023-12-20 19:16:35 +03:00
parent b3e018fa70
commit 7d29222534
2 changed files with 2 additions and 5 deletions

View File

@ -1,5 +1,4 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import { ButtonUi, ButtonUiType } from "../../../../shared/UI/ButtonUi";
@ -15,8 +14,6 @@ import styles from "./authLoginForm.module.scss";
export const AuthLoginFormUi = () => {
const navigate = useNavigate();
const schema = yup.object().shape({
username: yup.string()
.min(3, 'Минимум 3 символа!')
@ -50,7 +47,7 @@ export const AuthLoginFormUi = () => {
} else {
setCookie('authToken', res.data!.authToken)
setCookie('refreshToken', res.data!.refreshToken)
navigate("/auction")
window.location.replace("/auction")
}
return res.data as AuthResponsePayload
})

View File

@ -91,7 +91,7 @@ export const AuctionPage = () => {
setAuctionItems(res.data)
setLoader(false)
})
}, [getCookie('authToken')])
}, [])
return (
<div className={styles.home}>