From d20f5a82743a053fe5cedf6cb21baa39418a2e0d Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Thu, 19 Sep 2024 03:18:16 -0400 Subject: [PATCH] user profile page base --- bun.lockb | Bin 201016 -> 201016 bytes .../(pages)/dashboard/user/profile/page.tsx | 71 +++++++++++ src/components/dashboard/sidebar/links.tsx | 6 + src/components/dashboard/sidebar/sidebar.tsx | 4 +- .../dashboard/sidebar/user-menu.tsx | 6 +- .../dashboard/user/avatar-setting.tsx | 34 ++++++ .../dashboard/user/email-setting.tsx | 37 ++++++ .../dashboard/user/tier-setting.tsx | 49 ++++++++ .../dashboard/user/username-setting.tsx | 37 ++++++ src/components/ui/breadcrumb.tsx | 115 ++++++++++++++++++ src/components/user/user-avatar.tsx | 2 +- src/lib/string.ts | 10 ++ 12 files changed, 365 insertions(+), 6 deletions(-) create mode 100644 src/app/(pages)/dashboard/user/profile/page.tsx create mode 100644 src/components/dashboard/user/avatar-setting.tsx create mode 100644 src/components/dashboard/user/email-setting.tsx create mode 100644 src/components/dashboard/user/tier-setting.tsx create mode 100644 src/components/dashboard/user/username-setting.tsx create mode 100644 src/components/ui/breadcrumb.tsx create mode 100644 src/lib/string.ts diff --git a/bun.lockb b/bun.lockb index dfdd62b386936fcf3994425dd7464114d6e62f6b..c3bb01f8660c805f238943a8fede956a215d49a6 100644 GIT binary patch delta 42 vcmdn7h-b$lo`x-qmOt4U ( +
+
+ + {/* Content */} +
+ + + + + + + + +
+
+); + +const Header = (): ReactElement => { + const user: User | undefined = useUserContext( + (state: UserState) => state.user + ); + return ( +
+

My Profile

+ + + + + + Dashboard + + + + {user?.username} + + + My Profile + + + +
+ ); +}; + +export default UserProfilePage; diff --git a/src/components/dashboard/sidebar/links.tsx b/src/components/dashboard/sidebar/links.tsx index 97a213f..ce64eb7 100644 --- a/src/components/dashboard/sidebar/links.tsx +++ b/src/components/dashboard/sidebar/links.tsx @@ -10,6 +10,7 @@ import { ClipboardIcon, Cog6ToothIcon, FireIcon, + PencilSquareIcon, WrenchIcon, } from "@heroicons/react/24/outline"; import { useOrganizationContext } from "@/app/provider/organization-provider"; @@ -37,6 +38,11 @@ const links: SidebarLink[] = [ icon: , href: "/insights", }, + { + name: "Audit Logs", + icon: , + href: "/audit", + }, { name: "Settings", icon: , diff --git a/src/components/dashboard/sidebar/sidebar.tsx b/src/components/dashboard/sidebar/sidebar.tsx index 1e32e90..ce0561d 100644 --- a/src/components/dashboard/sidebar/sidebar.tsx +++ b/src/components/dashboard/sidebar/sidebar.tsx @@ -26,11 +26,11 @@ const Sidebar = (): ReactElement => {