fixes
This commit is contained in:
parent
b3e018fa70
commit
7d29222534
@ -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
|
||||
})
|
||||
|
@ -91,7 +91,7 @@ export const AuctionPage = () => {
|
||||
setAuctionItems(res.data)
|
||||
setLoader(false)
|
||||
})
|
||||
}, [getCookie('authToken')])
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className={styles.home}>
|
||||
|
Loading…
Reference in New Issue
Block a user