plane/apps/app/layouts/navbar/DefaultTopBar.tsx

34 lines
911 B
TypeScript
Raw Normal View History

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">
Plan<span className="text-theme">e</span>
2022-11-19 14:21:26 +00:00
</h2>
</a>
</Link>
</div>
{user && (
<div>
<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;