diff --git a/src/frontend/src/views/UserProfile/index.tsx b/src/frontend/src/views/UserProfile/index.tsx index 683887f3..a2d86e16 100644 --- a/src/frontend/src/views/UserProfile/index.tsx +++ b/src/frontend/src/views/UserProfile/index.tsx @@ -1,9 +1,69 @@ +import { useTypedDispatch, useTypedSelector } from '@Store/hooks'; import { UserProfileHeader } from '@Components/UserProfile'; +import { tabOptions } from '@Constants/index'; +import { setCommonState } from '@Store/actions/common'; +import { Button } from '@Components/RadixComponents/Button'; +import { + BasicDetails, + OrganizationDetails, + PasswordSection, +} from '@Components/UserProfile/FormContents'; +import Tab from './UserProfileTabs'; + +const getActiveFormContent = (activeTab: number) => { + switch (activeTab) { + case 1: + return ; + case 2: + return ; + case 3: + return ; + default: + return <>>; + } +}; export default function UserProfile() { + const dispatch = useTypedDispatch(); + const userProfileActiveTab = useTypedSelector( + state => state.common.userProfileActiveTab, + ); + + const onNextBtnClick = () => { + if (userProfileActiveTab === 3) return; + dispatch( + setCommonState({ userProfileActiveTab: userProfileActiveTab + 1 }), + ); + }; + return ( + + + + { + dispatch(setCommonState({ userProfileActiveTab: info })); + }} + tabOptions={tabOptions} + activeTab={userProfileActiveTab} + /> + + + {getActiveFormContent(userProfileActiveTab)} + + {userProfileActiveTab === 3 ? 'Complete Profile' : 'Next'} + + + + ); }