feat : optimaze code by eslint

This commit is contained in:
alij
2024-07-03 14:51:40 +03:30
parent d0e3f6be00
commit face0a30d9
7 changed files with 24 additions and 54 deletions

View File

@@ -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} />

View File

@@ -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">