feat(useSnackbar): strict types

This commit is contained in:
Christopher committed 2021-02-11 01:00:40 +01:00
1 parent 7160fcdfac
commit 8ec2a4769d
1 file changed
+1 -1
+1 -1
View File
@@ -2,7 +2,7 @@ import { useContext } from 'react';
import { SnackbarContext } from '../components/SnackbarProvider';
interface ISnackBar {
addAlert: (message: string, type: string) => void;
addAlert: (message: string, type: 'success' | 'error') => void;
}
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);