From 4d43158fe2f81c46c72ff7f9c8c90300cc6a51cb Mon Sep 17 00:00:00 2001 From: Developer <> Date: Thu, 25 Feb 2021 11:06:42 -0500 Subject: [PATCH] Updated NotificationsPage to reset to 'all' every time page loads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - NotificationsPage to reset to 'all' every time page loads --- app/javascript/gabsocial/pages/notifications_page.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/javascript/gabsocial/pages/notifications_page.js b/app/javascript/gabsocial/pages/notifications_page.js index 6de64023..c7e5cbee 100644 --- a/app/javascript/gabsocial/pages/notifications_page.js +++ b/app/javascript/gabsocial/pages/notifications_page.js @@ -16,6 +16,13 @@ import { class NotificationsPage extends React.PureComponent { + componentWillUnmount() { + const { selectedFilter } = this.props + if (selectedFilter !== 'all') { + this.props.dispatch(setFilter('active', 'all')) + } + } + onChangeActiveFilter(notificationType) { this.props.dispatch(setFilter('active', notificationType))