Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

fix/375#1 Remove notifications when they are viewed #392

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from

Conversation

ronaldblanco
Copy link
Contributor

@ronaldblanco ronaldblanco commented Jul 12, 2018

To fix 375#1 (Remove notifications when they are viewed)
The solution was tested locally and lint checked.
#375

@ronaldblanco
Copy link
Contributor Author

Hello @jspaine;
Take a look to this solution for the 375 #1 Issue and let me know.

Thanks.

@jspaine
Copy link
Contributor

jspaine commented Jul 12, 2018

Hi, it works but you should use the Link component or the whole page re-renders. Also clicked notifications in the dropdown in the top right corner don't get deleted.

@ronaldblanco
Copy link
Contributor Author

I do not understand, when I click to view anyway will navigated to the notification URL so you will refresh the page once you come-back.
I will be working in the dropdown.

@jspaine
Copy link
Contributor

jspaine commented Jul 13, 2018

Try it, the whole page reloads if you use a regular link, if you use react-router Link only the main section of the view changes. You can look at window.history in the console after clicking view notification - react router pushes the new url onto the history with a state object and triggers the view to update, when you go back it can just update the view again, with regular links there's no state in the history and the page just reloads at the current url.

You can also use push from react-router-redux and navigate in the viewAndDeleteNotification method (or change the name because at the moment all it does is delete the notification)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants