From 36d7b9e71e6946180a7e6aa402d999cb2d2a0125 Mon Sep 17 00:00:00 2001 From: jaanvi Date: Tue, 4 Mar 2025 18:12:15 +0530 Subject: [PATCH] Profile page option feature and Its Design Implemented --- src/pages/ProfilePage/index.tsx | 133 ++++++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 31 deletions(-) diff --git a/src/pages/ProfilePage/index.tsx b/src/pages/ProfilePage/index.tsx index 1bebb78..f1d2f32 100644 --- a/src/pages/ProfilePage/index.tsx +++ b/src/pages/ProfilePage/index.tsx @@ -1,7 +1,3 @@ -//Eknoor singh -//date:- 12-Feb-2025 -//Made a special page for showing the profile details - import { useEffect } from "react"; import { Container, @@ -12,16 +8,15 @@ import { Grid, Avatar, Box, + Stack, + Divider, + Link, } from "@mui/material"; - import { useDispatch, useSelector } from "react-redux"; import { AppDispatch, RootState } from "../../redux/store/store"; import { fetchAdminProfile } from "../../redux/slices/profileSlice"; const ProfilePage = () => { - //Eknoor singh - //date:- 12-Feb-2025 - //Dispatch is called and user, isLoading, and error from Authstate Interface const dispatch = useDispatch(); const { user, isLoading } = useSelector( (state: RootState) => state?.profileReducer @@ -49,34 +44,110 @@ const ProfilePage = () => { return ( - Profile + Account Info - + - - + + + + + {user?.name || "No Admin"} + + + {user?.userType || "N/A"} + + + + + + + + Personal Information + + + Edit + + + + + + + Name: + + + {user?.name || "N/A"} + + + + + Phone: + + + {user?.phone || "N/A"} + + + + + Email: + + + {user?.email || "N/A"} + + - - - {user?.name || "N/A"} - - - Email: {user?.email || "N/A"} - - - Phone: {user?.phone || "N/A"} - - - Role: {user?.userType || "N/A"} - - - + + + + Bio: + + + {user?.bio || "No bio available."} + +