edit profile page: fixing genres and instrument loading issue
This commit is contained in:
parent
3695b2f5d4
commit
3300b5a37a
|
|
@ -66,7 +66,7 @@ function JKEditProfile() {
|
|||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!userProfile) return;
|
||||
if (!userProfile || Object.keys(userProfile).length === 0) return;
|
||||
updateFormData(userProfile);
|
||||
setUserGenres(userProfile.genres);
|
||||
setUserMusicInstruments(userProfile.instruments);
|
||||
|
|
@ -114,7 +114,7 @@ function JKEditProfile() {
|
|||
|
||||
useEffect(() => {
|
||||
if (instrumentsInitialLoadingDone || musicInstruments.length === 0) return;
|
||||
|
||||
|
||||
const updatedMusicInstruments = musicInstruments.map(musicInstrument => {
|
||||
const instrument = getValues('instruments').find(instrument => instrument.instrument_id === musicInstrument.id);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue