diff --git a/src/app/[orgId]/components/Header.tsx b/src/app/[orgId]/components/Header.tsx new file mode 100644 index 00000000..9ab5b5b5 --- /dev/null +++ b/src/app/[orgId]/components/Header.tsx @@ -0,0 +1,87 @@ +"use client"; + +import { Avatar, AvatarFallback } from "@app/components/ui/avatar"; +import { Badge } from "@app/components/ui/badge"; +import { Button } from "@app/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuShortcut, + DropdownMenuTrigger, +} from "@app/components/ui/dropdown-menu"; +import Link from "next/link"; + +type HeaderProps = { + name?: string; + email: string; + orgName: string; +}; + +export default function Header({ email, orgName, name }: HeaderProps) { + function getInitials() { + if (name) { + const [firstName, lastName] = name.split(" "); + return `${firstName[0]}${lastName[0]}`; + } + return email.substring(0, 2).toUpperCase(); + } + + return ( + <> +
+ {name} +
+ )} ++ {email} +
+- {isCreateForm - ? "Create a new site for your profile." - : "This is how others will see you on the site."} -
-+ {isCreateForm + ? "Create a new site for your profile." + : "This is how others will see you on the site."} +
+- {name} -
- )} -- {email} -
-