From 2a9f475cdc06ba631fe7a23e1e97b5c4868cde03 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 1 Mar 2021 19:42:48 +0100 Subject: [PATCH 1/2] tweak(phone/snackbarprovider): remove redunant function --- phone/src/ui/providers/SnackbarProvider.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/phone/src/ui/providers/SnackbarProvider.tsx b/phone/src/ui/providers/SnackbarProvider.tsx index c1fe553..5985edb 100644 --- a/phone/src/ui/providers/SnackbarProvider.tsx +++ b/phone/src/ui/providers/SnackbarProvider.tsx @@ -16,10 +16,8 @@ function SnackbarProvider({ children }) { return () => clearTimeout(timer.current); }, [alert]); - const addAlert = (value) => setAlert(value); - return ( - + {children} ); From 8bca955ad7bb7870a8baa062aa632b807a34bc5e Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 1 Mar 2021 20:01:16 +0100 Subject: [PATCH 2/2] update delay --- phone/src/ui/providers/SnackbarProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phone/src/ui/providers/SnackbarProvider.tsx b/phone/src/ui/providers/SnackbarProvider.tsx index 5985edb..4a721c5 100644 --- a/phone/src/ui/providers/SnackbarProvider.tsx +++ b/phone/src/ui/providers/SnackbarProvider.tsx @@ -11,7 +11,7 @@ function SnackbarProvider({ children }) { clearTimeout(timer.current); timer.current = setTimeout(() => { setAlert(null); - }, 1000); + }, 2000); } return () => clearTimeout(timer.current); }, [alert]);