From e49a8106ad27ba869efec9d5e63e12b00254fbd0 Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Tue, 14 May 2024 09:55:07 +0300 Subject: [PATCH] fix: show all notifications by default in notifications page to prevent confusion with sidebar item showing that you have new notifications but the table not showing any because the default filter is for last week only Signed-off-by: Heikki Hellgren --- .changeset/nice-scissors-jog.md | 5 +++++ .../src/components/NotificationsPage/NotificationsPage.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/nice-scissors-jog.md diff --git a/.changeset/nice-scissors-jog.md b/.changeset/nice-scissors-jog.md new file mode 100644 index 0000000000..7065a9e63f --- /dev/null +++ b/.changeset/nice-scissors-jog.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications': patch +--- + +Show all notifications by default to match the sidebar item status diff --git a/plugins/notifications/src/components/NotificationsPage/NotificationsPage.tsx b/plugins/notifications/src/components/NotificationsPage/NotificationsPage.tsx index d1dde185f2..ef1fda0407 100644 --- a/plugins/notifications/src/components/NotificationsPage/NotificationsPage.tsx +++ b/plugins/notifications/src/components/NotificationsPage/NotificationsPage.tsx @@ -71,7 +71,7 @@ export const NotificationsPage = (props?: NotificationsPageProps) => { const [pageNumber, setPageNumber] = React.useState(0); const [pageSize, setPageSize] = React.useState(5); const [containsText, setContainsText] = React.useState(); - const [createdAfter, setCreatedAfter] = React.useState('lastWeek'); + const [createdAfter, setCreatedAfter] = React.useState('all'); const [sorting, setSorting] = React.useState( SortByOptions.newest.sortBy, );