From 1730ea11f7d655a86b7e3204f6325d7bd26b0d0a Mon Sep 17 00:00:00 2001 From: Aayan Date: Fri, 10 Jan 2025 22:32:09 +0530 Subject: [PATCH] profile page updated and minor changes in dashboard sidebar --- app/dashboard/layout.tsx | 2 + app/dashboard/profile/page.tsx | 58 +++++++++++++++-------- components/dashboard/DashboardSidebar.tsx | 2 +- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx index 51ff0a9..5d34c33 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -21,7 +21,9 @@ export default function DashboardLayout({
{/* page main content */} +
{children} +
{/* page main content ends */} diff --git a/app/dashboard/profile/page.tsx b/app/dashboard/profile/page.tsx index 0597a9e..0476e1d 100644 --- a/app/dashboard/profile/page.tsx +++ b/app/dashboard/profile/page.tsx @@ -4,7 +4,7 @@ import { useState } from "react"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import * as z from "zod"; -import { Loader2, User } from "lucide-react"; +import { Loader2, User } from 'lucide-react'; import { Button } from "@/components/ui/button"; import { Form, @@ -16,7 +16,7 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; import { useSupabase } from "@/components/providers/SupabaseProvider"; import { useToast } from "@/hooks/use-toast"; import { ToastAction } from "@/components/ui/toast"; @@ -48,6 +48,7 @@ export default function ProfilePage() { }); if (error) throw error; toast({ + title: "Success! 🎉", description: "Profile updated successfully", }); } catch (error) { @@ -63,20 +64,33 @@ export default function ProfilePage() { } return ( -
- - - Profile Settings +
+ + + Your Profile + Manage your account details and preferences -
- - - - - - - +
+
+ + + + + + + {/* */} +
+
+

{user?.user_metadata?.full_name || "Your Name"}

+

{user?.email || "your.email@example.com"}

+
@@ -88,7 +102,7 @@ export default function ProfilePage() { Full Name - + @@ -101,20 +115,22 @@ export default function ProfilePage() { Email - + )} /> - +
+ +
); -} +} \ No newline at end of file diff --git a/components/dashboard/DashboardSidebar.tsx b/components/dashboard/DashboardSidebar.tsx index 53cee17..4393bc2 100644 --- a/components/dashboard/DashboardSidebar.tsx +++ b/components/dashboard/DashboardSidebar.tsx @@ -39,7 +39,7 @@ export function DashboardSidebar() { const pathname = usePathname(); return ( - +