mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
fix alert provider | remove alert from notes and contact
This commit is contained in:
1 parent
9ba8bd683f
commit
b4258718d8
13 files changed
+67
-175
No files matched your search
@@ -1,8 +1,15 @@
|
||||
import { useContext } from 'react';
|
||||
import { SnackbarContext } from '../components/SnackbarProvider';
|
||||
|
||||
|
||||
export interface IAlert {
|
||||
message: string;
|
||||
type: 'success' | 'error'
|
||||
}
|
||||
|
||||
interface ISnackBar {
|
||||
addAlert: (message: string, type: 'success' | 'error') => void;
|
||||
addAlert: ({ message, type}: IAlert) => void;
|
||||
alert: IAlert | null;
|
||||
}
|
||||
|
||||
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
|
||||
Reference in new issue
Block a user