feat : optimaze code by eslint
This commit is contained in:
@@ -7,11 +7,11 @@ import router from "../../../../routes/routes";
|
||||
import Button from "../../../button";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Route } from "../../../../types/props";
|
||||
import { isAuthenticated } from "../../../../utils/auth";
|
||||
import { IsAuthenticated } from "../../../../utils/auth";
|
||||
|
||||
const Navbar = ({extra}:{extra?:string}) => {
|
||||
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||
const auth = isAuthenticated();
|
||||
const auth = IsAuthenticated();
|
||||
const [routes] = useState<Route[]>(router);
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -46,7 +46,7 @@ const Navbar = ({extra}:{extra?:string}) => {
|
||||
{auth ? (
|
||||
<Button onClick={() => navigate("/profile")}>پروفایل</Button>
|
||||
) : (
|
||||
<Button onClick={() => navigate("/login")}>ورود</Button>
|
||||
<Button onClick={() => navigate("/login")}>ورود یا ثبت نام</Button>
|
||||
)}
|
||||
<div className="md:hidden">
|
||||
<MobileMenuButton isOpen={isOpen} onClick={toggleMenu} />
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import React from "react";
|
||||
|
||||
const LoaderSpin = ({ children }: { children: React.ReactNode }) => {
|
||||
return (
|
||||
<div className="relative w-full h-full flex justify-center items-center">
|
||||
|
||||
Reference in New Issue
Block a user