try tu update
This commit is contained in:
@@ -9,8 +9,6 @@ const Header = () => {
|
|||||||
const {authUser} = useAuthUser()
|
const {authUser} = useAuthUser()
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
|
|
||||||
console.log(authUser)
|
|
||||||
|
|
||||||
return <header className="bg-blue-700 text-xl text-white">
|
return <header className="bg-blue-700 text-xl text-white">
|
||||||
<div className="flex justify-between px-5 py-3">
|
<div className="flex justify-between px-5 py-3">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import {AxiosError} from "axios"
|
|
||||||
|
|
||||||
export function displayFormErrors(error: ValidationErrors|AxiosError, form: HTMLElement|null = null) {
|
export function displayFormErrors(error: ValidationErrors, form: HTMLElement|null = null) {
|
||||||
if (error.response && error.response.status === 422) {
|
if (error.response && error.response.status === 422) {
|
||||||
// @ts-ignore
|
|
||||||
const errors = error.response.data.errors
|
const errors = error.response.data.errors
|
||||||
const formBase = (form) ? form : document.body
|
const formBase = (form) ? form : document.body
|
||||||
Object.entries(errors).forEach(([key, value]) => {
|
Object.entries(errors).forEach(([key, value]) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user