typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.
This commit is contained in:
@@ -11,7 +11,7 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
|
||||
setTimeout(() => setList((arr) => arr.filter((x) => x.id !== id)), 3000);
|
||||
}, []);
|
||||
React.useEffect(() => {
|
||||
const onEvt = (e: any) => push(e.detail);
|
||||
const onEvt = (e: CustomEvent<Omit<Toast, 'id'>>) => push(e.detail);
|
||||
window.addEventListener('guest-toast', onEvt);
|
||||
return () => window.removeEventListener('guest-toast', onEvt);
|
||||
}, [push]);
|
||||
|
||||
Reference in New Issue
Block a user