()
| 8 | import { motion } from "framer-motion"; |
| 9 | |
| 10 | export const Appbar = () => { |
| 11 | const session = useSession(); |
| 12 | const user = session.data?.user; |
| 13 | |
| 14 | return ( |
| 15 | <nav className="sticky mx-auto wrapper top-0 z-50 flex items-center gap-2 py-6 w-full"> |
| 16 | <motion.div |
| 17 | initial={{ y: -20, opacity: 0 }} |
| 18 | animate={{ y: 0, opacity: 1 }} |
| 19 | transition={{ duration: 0.5, ease: "easeInOut", type: "spring", damping: 10 }} |
| 20 | className="flex w-full justify-between mx-auto bg-secondary/15 shadow-lg shadow-neutral-600/5 backdrop-blur-lg border border-primary/10 p-6 rounded-2xl" |
| 21 | > |
| 22 | <Link href={"/"} className="flex items-center gap-2 cursor-pointer"> |
| 23 | <Image |
| 24 | src={"https://appx-wsb-gcp.akamai.net.in/subject/2023-01-17-0.17044360120951185.jpg"} |
| 25 | alt="Logo" |
| 26 | width={300} |
| 27 | height={200} |
| 28 | className="rounded-full size-10" |
| 29 | /> |
| 30 | <span className="text-lg md:text-2xl font-bold tracking-tight text-foreground hidden md:block"> |
| 31 | 100xProjects |
| 32 | </span> |
| 33 | </Link> |
| 34 | <div className="flex items-center gap-8"> |
| 35 | <ModeToggle /> |
| 36 | {!user ? ( |
| 37 | <Button |
| 38 | size={"lg"} |
| 39 | onClick={async () => { |
| 40 | await signIn(); |
| 41 | }} |
| 42 | > |
| 43 | Login |
| 44 | </Button> |
| 45 | ) : ( |
| 46 | "" |
| 47 | )} |
| 48 | |
| 49 | <UserAccountDropDown /> |
| 50 | </div> |
| 51 | </motion.div> |
| 52 | </nav> |
| 53 | ); |
| 54 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected