File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
ui/desktop/src/components Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,5 +20,5 @@ export interface Alert {
2020 compactButtonDisabled ?: boolean ;
2121 onCompact ?: ( ) => void ;
2222 compactIcon ?: React . ReactNode ;
23- autoCompactThreshold ?: number ; // Add this for showing the auto-compact threshold
23+ autoCompactThreshold ?: number ;
2424}
Original file line number Diff line number Diff line change 11import { useRef , useEffect , useCallback , useState } from 'react' ;
22import { FaCircle } from 'react-icons/fa' ;
3+ import { isEqual } from 'lodash' ;
34import { cn } from '../../utils' ;
45import { Alert , AlertType } from '../alerts' ;
56import { AlertBox } from '../alerts' ;
@@ -104,10 +105,10 @@ export default function BottomMenuAlertPopover({ alerts }: AlertPopoverProps) {
104105 return ;
105106 }
106107
107- // Find new or changed alerts
108+ // Find new or changed alerts using deep comparison
108109 const changedAlerts = alerts . filter ( ( alert , index ) => {
109110 const prevAlert = previousAlertsRef . current [ index ] ;
110- return ! prevAlert || prevAlert . type !== alert . type || prevAlert . message !== alert . message ;
111+ return ! prevAlert || ! isEqual ( prevAlert , alert ) ;
111112 } ) ;
112113
113114 previousAlertsRef . current = alerts ;
You can’t perform that action at this time.
0 commit comments