From 8ec2a4769d5f55fa23a129a53eb46ee8e22b78f1 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 11 Feb 2021 01:00:40 +0100 Subject: [PATCH] feat(useSnackbar): strict types --- phone/src/ui/hooks/useSnackbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phone/src/ui/hooks/useSnackbar.ts b/phone/src/ui/hooks/useSnackbar.ts index ee9dd33..d072f59 100644 --- a/phone/src/ui/hooks/useSnackbar.ts +++ b/phone/src/ui/hooks/useSnackbar.ts @@ -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); \ No newline at end of file