|
| 1 | +// import { AnimatePresence, motion } from "framer-motion"; |
| 2 | +import Link from "next/link"; |
| 3 | +import { useRouter } from "next/router"; |
| 4 | +import { |
| 5 | + FaAngleDown, |
| 6 | + FaGithub, |
| 7 | + FaHome, |
| 8 | + FaLink, |
| 9 | + FaSignOutAlt, |
| 10 | +} from "react-icons/fa"; |
| 11 | +import Image from "next/image"; |
| 12 | + |
| 13 | +// import { Dropdown, DropdownItem } from "@/ui/dropdown"; |
| 14 | +// import Loader from "@/ui/loader"; |
| 15 | +// |
| 16 | +// import { useAuth } from "@/hooks/useAuth"; |
| 17 | + |
| 18 | +const Header: React.FC = () => { |
| 19 | + // const { signOut, session, status } = useAuth(); |
| 20 | + const router = useRouter(); |
| 21 | + |
| 22 | + // const authenticated = status == "authenticated" && ( |
| 23 | + // <Dropdown |
| 24 | + // title={session?.user?.name || ""} |
| 25 | + // icon={<FaAngleDown className="h-5 text-inherit" />} |
| 26 | + // loader={false} |
| 27 | + // > |
| 28 | + // <h1 className="border-white/5 border-b-2 font-bold px-3 pb-1 text-md"> |
| 29 | + // {session?.user?.name} |
| 30 | + // </h1> |
| 31 | + // |
| 32 | + // <DropdownItem |
| 33 | + // icon={<FaSignOutAlt className="h-4 text-inherit text-white" />} |
| 34 | + // onClick={signOut} |
| 35 | + // > |
| 36 | + // Sign Out |
| 37 | + // </DropdownItem> |
| 38 | + // {router.route != "/" && ( |
| 39 | + // <DropdownItem icon={<FaHome className="h-4 text-inherit" />}> |
| 40 | + // <Link href="/">Home</Link> |
| 41 | + // </DropdownItem> |
| 42 | + // )} |
| 43 | + // <DropdownItem icon={<FaLink className="h-4 text-inherit" />}> |
| 44 | + // <a |
| 45 | + // href="https://github.com/awtkns/confetti/issues/new" |
| 46 | + // target="_blank" |
| 47 | + // rel="noreferrer" |
| 48 | + // > |
| 49 | + // Report a bug |
| 50 | + // </a> |
| 51 | + // </DropdownItem> |
| 52 | + // </Dropdown> |
| 53 | + // ); |
| 54 | + |
| 55 | + // const loading = status == "loading" && <Loader />; |
| 56 | + // |
| 57 | + // const unauthenticated = |
| 58 | + // status == "unauthenticated" && router.route != "/auth" ? ( |
| 59 | + // <Link href="/auth">Sign In</Link> |
| 60 | + // ) : ( |
| 61 | + // <Link href="/">Home</Link> |
| 62 | + // ); |
| 63 | + |
| 64 | + const github = ( |
| 65 | + <a |
| 66 | + href="https://github.com/reworkd/AgentGPT" |
| 67 | + className="right-0 ml-0 block block text-white hover:text-yellow-500" |
| 68 | + > |
| 69 | + <span className="sr-only">Confetti on GitHub</span> |
| 70 | + <FaGithub size="25" /> |
| 71 | + </a> |
| 72 | + ); |
| 73 | + |
| 74 | + return ( |
| 75 | + <header className="z-50 w-full p-2 relative flex flex-row items-center justify-between align-middle"> |
| 76 | + <Image src="logo-white.svg" alt="yes" width={30} height={0} /> |
| 77 | + {/*<AnimatePresence>*/} |
| 78 | + {/* <motion.div*/} |
| 79 | + {/* initial={{ opacity: 0 }}*/} |
| 80 | + {/* animate={{ opacity: 1 }}*/} |
| 81 | + {/* transition={{ duration: 1, type: "spring" }}*/} |
| 82 | + {/* className="ml-auto pr-4 text-lg text-white hover:text-yellow-500"*/} |
| 83 | + {/* >*/} |
| 84 | + {/* {authenticated || loading || unauthenticated}*/} |
| 85 | + {/* </motion.div>*/} |
| 86 | + {/*</AnimatePresence>*/} |
| 87 | + {github} |
| 88 | + </header> |
| 89 | + ); |
| 90 | +}; |
| 91 | + |
| 92 | +export default Header; |
0 commit comments