()
| 55 | } |
| 56 | |
| 57 | function useToastStore() { |
| 58 | const [toasts, setToasts] = React.useState<ToastData[]>([]) |
| 59 | React.useEffect(() => { |
| 60 | setToasts([...toastList]) |
| 61 | listeners.add(setToasts) |
| 62 | return () => { listeners.delete(setToasts) } |
| 63 | }, []) |
| 64 | return toasts |
| 65 | } |
| 66 | |
| 67 | // ── Style variants ──────────────────────────────────────────────────────────── |
| 68 |
no test coverage detected