2022-11-19 14:21:26 +00:00
|
|
|
import React from "react";
|
|
|
|
// next js
|
|
|
|
import Link from "next/link";
|
|
|
|
// hooks
|
|
|
|
import useUser from "lib/hooks/useUser";
|
|
|
|
|
|
|
|
const DefaultTopBar: React.FC = () => {
|
|
|
|
const { user } = useUser();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="flex justify-between items-center px-4 h-16 sm:px-6 md:justify-start md:space-x-10 absolute top-0 w-full">
|
|
|
|
<div className="w-full flex items-center justify-between">
|
|
|
|
<div>
|
|
|
|
<Link href="/">
|
|
|
|
<a className="flex">
|
|
|
|
<span className="sr-only">Plane</span>
|
|
|
|
<h2 className="text-2xl font-semibold">
|
2022-12-13 15:52:44 +00:00
|
|
|
Plan<span className="text-theme">e</span>
|
2022-11-19 14:21:26 +00:00
|
|
|
</h2>
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
{user && (
|
|
|
|
<div>
|
2022-12-13 15:52:44 +00:00
|
|
|
<p className="text-sm text-gray-500">logged in as {user.first_name}</p>
|
2022-11-19 14:21:26 +00:00
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default DefaultTopBar;
|