fix: wrap dismissNotification with useUnit in NotificationStack for scope isolation; fix test selectors

This commit is contained in:
Kirill
2026-05-27 21:19:08 +05:00
parent 30bb25c416
commit 9502a0c550
2 changed files with 59 additions and 23 deletions
@@ -1,10 +1,11 @@
import { useUnit } from 'effector-react'
import { Snackbar, Alert, Stack, IconButton } from '@mui/material'
import CloseIcon from '@mui/icons-material/Close'
import { $notifications, dismissNotification } from '../../model/notification'
import { $notifications, dismissNotification as dismissNotificationEvent } from '../../model/notification'
export function NotificationStack() {
const notifications = useUnit($notifications)
const dismissNotification = useUnit(dismissNotificationEvent)
if (notifications.length === 0) return null