From f287e8225892266acf162ba94ee31ce623e06890 Mon Sep 17 00:00:00 2001 From: Factiven Date: Fri, 28 Apr 2023 13:36:29 +0700 Subject: Editor List v0.2 --- components/useAlert.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'components/useAlert.js') diff --git a/components/useAlert.js b/components/useAlert.js index 7426096..fa82c42 100644 --- a/components/useAlert.js +++ b/components/useAlert.js @@ -10,8 +10,10 @@ const useAlert = () => { setTimeout(() => { setMessage(""); setType(""); - window.location.reload(); - }, 5000); + if (type === "success") { + window.location.reload(); + } + }, 3000); }; return { message, type, showAlert }; -- cgit v1.2.3