Code styling changes

This commit is contained in:
2023-07-13 18:38:31 +03:00
parent 9437c44054
commit 7b0ccc525c
33 changed files with 358 additions and 387 deletions

View File

@ -1,13 +1,14 @@
import { PropsWithChildren, useEffect } from "react"
import { getToken } from "../utils/auth"
import { useNavigate } from "react-router-dom"
import { PropsWithChildren, useEffect } from 'react'
import { useNavigate } from 'react-router-dom'
import { getToken } from '../utils/auth'
function WithToken({ children }: PropsWithChildren) {
const navigate = useNavigate()
useEffect(() => {
if (!getToken()) {
return navigate("/login")
return navigate('/login')
}
}, [navigate])