You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
import Link from 'next/link'
|
|
import { FC } from 'react'
|
|
import { Button } from '../../components/Button';
|
|
import Cookies from 'js-cookie';
|
|
import { useRouter } from 'next/router';
|
|
|
|
interface Props {
|
|
}
|
|
|
|
export const Navbar:FC <Props> = () => {
|
|
const router = useRouter();
|
|
return (
|
|
<>
|
|
<div className="navbar">
|
|
<div className="flex-none">
|
|
<label htmlFor="my-drawer-2" className="btn btn-square btn-ghost drawer-button lg:hidden">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" className="inline-block w-5 h-5 stroke-current"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
|
</label>
|
|
</div>
|
|
<div className="flex-1">
|
|
<Link href={"/home"}>
|
|
<img className="w-20 mr-4" src="/logo.png" alt="Sistema Agil" />
|
|
</Link>
|
|
|
|
|
|
|
|
</div>
|
|
<div className="flex-none">
|
|
<div className="dropdown dropdown-end">
|
|
<Button
|
|
title={'Logout'}
|
|
onClick={function (): void {
|
|
console.log("Logout")
|
|
Cookies.remove("token");
|
|
router.push("/login");
|
|
}}/>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</>
|
|
)
|
|
} |