Skip to content

Commit

Permalink
fix for experience section resetting in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rishimohan committed Nov 27, 2023
1 parent b598a4d commit 2800668
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/web/pages/settings/profile/experience.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ const GeneralView = ({ user }) => {
};

useEffect(() => {
setData((prev) => ({ ...prev, experience: transformExpForUI(user) }));
setData((prev) => ({
...prev,
experience: prev?.experience?.length ? prev.experience : transformExpForUI(user),
}));
}, [user]);

const onSave = (e) => {
Expand Down

0 comments on commit 2800668

Please sign in to comment.