diff --git a/components/index.ts b/components/index.ts
index 3fe34e7..fda8d0e 100644
--- a/components/index.ts
+++ b/components/index.ts
@@ -3,10 +3,12 @@ import LoginButton from './widgets/login/LoginButton';
import TaggedInput from './widgets/TaggedInput';
import ImageUpload from './widgets/ImageUpload';
import SharingComponent from './widgets/SharingComponent';
+import UserNavDropdown from './widgets/UserNavDropdown';
export {
GifContainer,
LoginButton,
TaggedInput,
ImageUpload,
SharingComponent,
+ UserNavDropdown,
};
diff --git a/components/layout/Navbar.tsx b/components/layout/Navbar.tsx
index 4be5303..8d8f9b3 100644
--- a/components/layout/Navbar.tsx
+++ b/components/layout/Navbar.tsx
@@ -1,69 +1,297 @@
-import React from 'react';
+import React, { Fragment } from 'react';
+import { MagnifyingGlassIcon } from '@heroicons/react/24/solid';
+import { BellIcon, AcademicCapIcon, XIcon } from '@heroicons/react/24/outline';
import Image from 'next/image';
-import { LoginButton } from '@components';
+import { useSession } from 'next-auth/react';
+import { Disclosure, Menu, Transition } from '@headlessui/react';
import Link from 'next/link';
+import { useRouter } from 'next/router';
+function classNames(...classes) {
+ return classes.filter(Boolean).join(' ');
+}
const Navbar = () => {
+ const { data: session } = useSession();
+ const router = useRouter();
+ const currentRoute = router.pathname;
return (
-
+
+ {({ open }) => (
+ <>
+
+
+
+
+
+ {/* Mobile menu button */}
+
+ Open main menu
+ {open ? (
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+ {/* Profile dropdown */}
+
+
+
+
+
+
+
+
+ {/* Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" */}
+
+ Dashboard
+
+
+ Team
+
+
+ Projects
+
+
+ Calendar
+
+
+
+
+
+

+
+
+
+ Tom Cook
+
+
+ tom@example.com
+
+
+
+
+
+
+ Your Profile
+
+
+ Settings
+
+
+ Sign out
+
+
+
+
+ >
+ )}
+
);
};
diff --git a/components/widgets/UserNavDropdown.tsx b/components/widgets/UserNavDropdown.tsx
new file mode 100644
index 0000000..6a30733
--- /dev/null
+++ b/components/widgets/UserNavDropdown.tsx
@@ -0,0 +1,43 @@
+import { logger } from '@lib/logger';
+import React from 'react';
+import { UserCircleIcon } from '@heroicons/react/24/solid';
+import { signOut } from 'next-auth/react';
+
+interface IUserNavDropdownProps {
+ session: any;
+}
+const UserNavDropdown: React.FC = ({ session }) => {
+ React.useEffect(() => {
+ logger.debug('UserNavDropdown', 'session', session);
+ }, [session]);
+
+ return (
+
+
+
+ -
+ Profile
+
+ -
+
+
+
+
+ );
+};
+
+export default UserNavDropdown;
diff --git a/components/widgets/login/LoginButton.tsx b/components/widgets/login/LoginButton.tsx
index b10d9fe..f79d042 100644
--- a/components/widgets/login/LoginButton.tsx
+++ b/components/widgets/login/LoginButton.tsx
@@ -1,21 +1,18 @@
import React from 'react';
-import { useSession, signIn, signOut } from 'next-auth/react';
+import { signIn } from 'next-auth/react';
import {
ArrowLeftCircleIcon,
ArrowRightCircleIcon,
} from '@heroicons/react/24/outline';
+import { UserNavDropdown } from '@components';
-const LoginButton = () => {
- const { data: session } = useSession();
+interface ILoginButtonProps {
+ session: any;
+}
+
+const LoginButton: React.FC = ({ session }) => {
return session ? (
-
+
) : (