Skip to content

Commit f1f1f3b

Browse files
committed
console: Fix navigate after archive on small screen
1 parent b7b909f commit f1f1f3b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pkg/webui/console/containers/notifications/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,18 @@ const Notifications = React.memo(() => {
120120
index + BATCH_SIZE > items.length - 1 ? items.length - 1 : index + BATCH_SIZE,
121121
)
122122

123-
navigate(`/notifications/${category}/${previousNotification.id}`)
123+
if (isSmallScreen) {
124+
navigate(`/notifications/${category}`)
125+
} else {
126+
navigate(`/notifications/${category}/${previousNotification.id}`)
127+
}
124128

125129
// Reset the list cache if available so that old items are discarded.
126130
if (listRef.current && listRef.current.resetloadMoreItemsCache) {
127131
listRef.current.resetloadMoreItemsCache()
128132
}
129133
},
130-
[showArchived, dispatch, items, totalCount, navigate, category, loadNextPage],
134+
[showArchived, dispatch, items, totalCount, navigate, category, loadNextPage, isSmallScreen],
131135
)
132136

133137
// Add a resize handler to detect mobile experiences.

pkg/webui/console/containers/notifications/notification-content/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const NotificationContent = ({ onArchive, selectedNotification }) => {
7070
<Button.Link
7171
to="/notifications/inbox"
7272
icon="chevron_left"
73-
className="m:d-flex d-none"
73+
className="s:d-flex d-none"
7474
naked
7575
/>
7676
<div>

0 commit comments

Comments
 (0)