mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(notifications): limit only in header [EE-4815] (#8579)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
fd916bc8a2
commit
07df4b1591
2 changed files with 7 additions and 13 deletions
|
@ -33,6 +33,7 @@ export function NotificationsMenu() {
|
|||
notificationsStore,
|
||||
(state) => state.userNotifications[user.Id]
|
||||
);
|
||||
const reducedNotifications = userNotifications?.slice(0, 50);
|
||||
|
||||
return (
|
||||
<Menu>
|
||||
|
@ -55,7 +56,7 @@ export function NotificationsMenu() {
|
|||
<Icon icon={Bell} />
|
||||
<span
|
||||
className={
|
||||
userNotifications?.length > 0 ? notificationStyles.badge : ''
|
||||
reducedNotifications?.length > 0 ? notificationStyles.badge : ''
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
@ -77,7 +78,7 @@ export function NotificationsMenu() {
|
|||
<h4>Notifications</h4>
|
||||
</div>
|
||||
<div className={notificationStyles.itemLast}>
|
||||
{userNotifications?.length > 0 && (
|
||||
{reducedNotifications?.length > 0 && (
|
||||
<Button
|
||||
color="none"
|
||||
onClick={(e) => {
|
||||
|
@ -93,10 +94,10 @@ export function NotificationsMenu() {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{userNotifications?.length > 0 ? (
|
||||
{reducedNotifications?.length > 0 ? (
|
||||
<>
|
||||
<div className={notificationStyles.notifications}>
|
||||
{userNotifications.map((notification) => (
|
||||
{reducedNotifications.map((notification) => (
|
||||
<MenuLink
|
||||
to="portainer.notifications"
|
||||
params={{ id: notification.id }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue