Client Portal - Fix Employee Data
This commit is contained in:
@@ -25,6 +25,7 @@ export default function UserProfile() {
|
||||
const { themeStretch } = useSettings();
|
||||
const navigate = useNavigate();
|
||||
const [data, setData] = useState<UserProfileDataType>();
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||
const { id } = useParams();
|
||||
@@ -35,8 +36,8 @@ export default function UserProfile() {
|
||||
.get(corporateValue + '/members/' + id)
|
||||
.then((response) => {
|
||||
setTimeout(() => {
|
||||
console.log(response.data);
|
||||
setData(response.data);
|
||||
setLoading(false);
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -64,7 +65,7 @@ export default function UserProfile() {
|
||||
<CardPersonalInformation data={data?.person} />
|
||||
</Grid>
|
||||
<Grid item xs={12} md={12}>
|
||||
<CardFamilyInformation data={data?.families} />
|
||||
<CardFamilyInformation data={data?.families} loading={loading} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Container>
|
||||
|
||||
Reference in New Issue
Block a user