Skip to content

Commit

Permalink
feat(user-profile): fetch user details on edit profile page mount
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujit committed Oct 21, 2024
1 parent 59882ef commit 6588746
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/frontend/src/views/UpdateUserProfile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { useDispatch } from 'react-redux';
import { setCommonState } from '@Store/actions/common';
import { useTypedSelector } from '@Store/hooks';
import Tab from '@Components/common/Tabs';
import BasicDetails from '@Components/UpdateUserDetails/BasicDetails.tsx';
import Header from '@Components/UpdateUserDetails/Header';
Expand All @@ -6,10 +9,7 @@ import OtherDetails from '@Components/UpdateUserDetails/OtherDetails';
import Password from '@Components/UpdateUserDetails/Password';
import { tabOptions } from '@Constants/index';
import useWindowDimensions from '@Hooks/useWindowDimensions';
import { setCommonState } from '@Store/actions/common';
import { useTypedSelector } from '@Store/hooks';
import { useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { useGetUserDetailsQuery } from '@Api/projects';

const getActiveFormContent = (activeTab: number, userType: string) => {
switch (activeTab) {
Expand All @@ -32,15 +32,12 @@ const UpdateUserProfile = () => {
const dispatch = useDispatch();
const { width } = useWindowDimensions();

useGetUserDetailsQuery();
const userProfileActiveTab = useTypedSelector(
state => state.common.userProfileActiveTab,
);
const signedInAs = localStorage.getItem('signedInAs') || 'PROJECT_CREATOR';

useEffect(() => {
return () => {};
}, []);

return (
<div className="main-content naxatw-w-full naxatw-flex-col naxatw-gap-3 md:naxatw-bg-gray-50">
<div className="naxatw-flex naxatw-h-full naxatw-flex-col md:naxatw-px-20">
Expand Down

0 comments on commit 6588746

Please sign in to comment.