mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(useSnackbar): strict types
This commit is contained in:
1 parent
7160fcdfac
commit
8ec2a4769d
1 file changed
+1
-1
@@ -2,7 +2,7 @@ import { useContext } from 'react';
|
|||||||
import { SnackbarContext } from '../components/SnackbarProvider';
|
import { SnackbarContext } from '../components/SnackbarProvider';
|
||||||
|
|
||||||
interface ISnackBar {
|
interface ISnackBar {
|
||||||
addAlert: (message: string, type: string) => void;
|
addAlert: (message: string, type: 'success' | 'error') => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
|
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
|
||||||
Reference in new issue
Block a user