Freecodecamp: Portfolio doesn't update until hard reload

Created on 7 Oct 2019  路  6Comments  路  Source: freeCodeCamp/freeCodeCamp

  1. Go to your profile settings page
  2. Change the privacy setting
  3. go to the top and click show me my public portfolio

The privacy setting you changed will not have taken effect.

From there, you can go back to the settings using the settings button, and the privacy setting will still show it as it was before you changed it.

I believe this is due to using gatsby Link to navigate to the portfolio. The setting will have actually changed in the DB, but the effects won't show until you do a hard reload.

client bug critical path

Most helpful comment

Go for it @ojeytonwilliams - let me know if you want to team up on it.

All 6 comments

I can fix this if it's decided to change it.

As far as I can see, the problem is that the user is only pulled from the server once. The server is getting updated correctly, but the redux store isn't being asked to mirror these changes.

as @ojeytonwilliams, there seems to be an issue with a redux reducer.

I was speaking to @Bouncey earlier and he says:

Take a look at the updateUserFlagSaga. The updateUserFlagComplete action shouldn't need the response message, and the update becomes nested on the user at <username>.payload

Is someone looking into this (@moT01)? Otherwise I can take a crack at it tomorrow.

Go for it @ojeytonwilliams - let me know if you want to team up on it.

Was this page helpful?
0 / 5 - 0 ratings