mirror of
https://github.com/philipredstone/relnet.git
synced 2025-06-16 20:51:16 +02:00
Fix addToast func parameters
This commit is contained in:
parent
9eddb1b547
commit
1243cdc5ae
@ -360,7 +360,7 @@ const FriendshipNetwork: React.FC = () => {
|
||||
});
|
||||
|
||||
// Add toast notification
|
||||
const addToast = (message: string, type = 'success') => {
|
||||
const addToast = (message: string, type: 'error' | 'success' | 'warning' | 'info' = 'success') => {
|
||||
const id = Date.now();
|
||||
setToasts(prevToasts => [...prevToasts, { id, message, type, onClose: () => removeToast(id) }]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user