MCPcopy Create free account
hub / github.com/code100x/daily-code / ProfileSidebar

Function ProfileSidebar

apps/web/components/ProfileSidebar.tsx:10–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8import { useSession } from "next-auth/react";
9
10export default function ProfileSidebar() {
11 const sidebarToggle = useRecoilValue(profileSidebar);
12 const session = useSession();
13 const user = session.data?.user;
14
15 return (
16 <>
17 <div
18 className={`${sidebarToggle ? "block transition-all dark:bg-[#06080d] py-3 lg:dark:bg-[#1d26435c] z-20 duration-100 fixed top-0 left-0 w-[60%] lg:w-[50%]" : "hidden lg:block"} col-span-2 top-10 h-full`}
19 >
20 <div className="dark:bg-[#1d26435c] sticky top-[4.5rem] dark:border-none border-2 bg-white px-2 rounded-2xl flex flex-col items-center max-h-[100vh] min-h-[100vh] py-6">
21 <div className="relative text-center flex flex-col items-center justify-center">
22 <div className="w-[6rem] mb-4 h-[6rem]">
23 {!user?.image ? (
24 <div className="p-1 h-full flex items-center justify-center w-full border-2 rounded-full dark:border-[#ffffffab] border-[#1a1a1a]">
25 <UserRound size={55} />
26 </div>
27 ) : (
28 <UserImage image={user?.image} />
29 )}
30 </div>
31 <div className="font-bold text-lg">{user?.name}</div>
32 <div className="text-xs text-gray-400">{user?.email}</div>
33 </div>
34
35 <div className="my-6 w-full"></div>
36
37 <ProfileOptions />
38 </div>
39 </div>
40 </>
41 );
42}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected