diff options
| author | MaheshtheDev <[email protected]> | 2026-01-15 21:53:53 +0000 |
|---|---|---|
| committer | MaheshtheDev <[email protected]> | 2026-01-15 21:53:53 +0000 |
| commit | 59c294b29998a861a870629d513f6da74b3d76ac (patch) | |
| tree | 265c9fe27984c6d322ba2e51b0fc91bc2302698d /apps/web/components/new/onboarding/setup/header.tsx | |
| parent | chore: quick bugs squash across the elements and added few more changes (#671) (diff) | |
| download | supermemory-59c294b29998a861a870629d513f6da74b3d76ac.tar.xz supermemory-59c294b29998a861a870629d513f6da74b3d76ac.zip | |
feat: deep-research on user profile and tiptap integration (#672)01-14-feat_deep-research_on_user_profile
deep-research on user profile
add novel integration
tiptap 3.x integration
Diffstat (limited to 'apps/web/components/new/onboarding/setup/header.tsx')
| -rw-r--r-- | apps/web/components/new/onboarding/setup/header.tsx | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/web/components/new/onboarding/setup/header.tsx b/apps/web/components/new/onboarding/setup/header.tsx new file mode 100644 index 00000000..4981c6aa --- /dev/null +++ b/apps/web/components/new/onboarding/setup/header.tsx @@ -0,0 +1,47 @@ +import { motion } from "motion/react" +import { Logo } from "@ui/assets/Logo" +import { useAuth } from "@lib/auth-context" +import { useEffect, useState } from "react" +import { Avatar, AvatarFallback, AvatarImage } from "@ui/components/avatar" + +export function SetupHeader() { + const { user } = useAuth() + const [name, setName] = useState<string>("") + + useEffect(() => { + const storedName = + localStorage.getItem("username") || localStorage.getItem("userName") || "" + setName(storedName) + }, []) + + const userName = name ? `${name.split(" ")[0]}'s` : "My" + + return ( + <motion.div + className="flex p-6 justify-between items-center" + initial={{ opacity: 0, y: -10 }} + animate={{ opacity: 1, y: 0 }} + transition={{ duration: 0.6, ease: "easeOut" }} + > + <div className="flex items-center z-10!"> + <Logo className="h-7" /> + {name && ( + <div className="flex flex-col items-start justify-center ml-2"> + <p className="text-[#8B8B8B] text-[11px] leading-tight"> + {userName} + </p> + <p className="text-white font-bold text-xl leading-none -mt-1"> + supermemory + </p> + </div> + )} + </div> + {user && ( + <Avatar className="border border-border h-8 w-8 md:h-10 md:w-10 z-10!"> + <AvatarImage src={user?.image ?? ""} /> + <AvatarFallback>{user?.name?.charAt(0)}</AvatarFallback> + </Avatar> + )} + </motion.div> + ) +} |