From 2054888e9093a913eb33bb9d04e2bc1341062112 Mon Sep 17 00:00:00 2001 From: Sujit Date: Wed, 25 Sep 2024 16:52:52 +0545 Subject: [PATCH] feat(user-profile): make responsive --- src/frontend/src/views/UserProfile/index.tsx | 55 ++++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/src/frontend/src/views/UserProfile/index.tsx b/src/frontend/src/views/UserProfile/index.tsx index 207efd5f..b634306e 100644 --- a/src/frontend/src/views/UserProfile/index.tsx +++ b/src/frontend/src/views/UserProfile/index.tsx @@ -22,6 +22,7 @@ import { removeKeysFromObject } from '@Utils/index'; import { getLocalStorageValue } from '@Utils/getLocalStorageValue'; import Tab from '@Components/common/Tabs'; import hasErrorBoundary from '@Utils/hasErrorBoundary'; +import useWindowDimensions from '@Hooks/useWindowDimensions'; const getActiveFormContent = ( activeTab: number, @@ -47,7 +48,7 @@ const getActiveFormContent = ( const UserProfile = () => { const dispatch = useTypedDispatch(); const navigate = useNavigate(); - + const { width } = useWindowDimensions(); const signedInAs = localStorage.getItem('signedInAs') || 'Project Creator'; const isDroneOperator = localStorage.getItem('signedInAs') === 'Drone Operator'; @@ -123,35 +124,33 @@ const UserProfile = () => { }; return ( -
+
-
-
-
- {}} - tabOptions={tabOptions} - activeTab={userProfileActiveTab} - /> -
-
+
+
+ {}} + tabOptions={tabOptions} + activeTab={userProfileActiveTab} + /> +
+
+
{getActiveFormContent(userProfileActiveTab, signedInAs, formProps)} - {userProfileActiveTab !== 1 && ( - - )} +
+
+
-
+
); };