profile page update synchronously.
making this chage to fetch all the data that need to be present for the page on initial loading
This commit is contained in:
parent
8f84e5d12d
commit
eb488e374b
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useRef, useEffect, useState, useReducer } from 'react';
|
||||
import React, { useRef, useEffect, useLayoutEffect, useState, useReducer } from 'react';
|
||||
import { Card, CardBody, Col, Row, CardHeader, Form, FormGroup, Label, Input, Button } from 'reactstrap';
|
||||
import Select from 'react-select';
|
||||
import FalconCardHeader from '../common/FalconCardHeader';
|
||||
|
|
@ -60,7 +60,7 @@ function JKEditProfile() {
|
|||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
useLayoutEffect(() => {
|
||||
if (currentUser && !currentUserLoaded) {
|
||||
setCurrentUserLoaded(true);
|
||||
fetchCurentUser().then(data => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue