aboutsummaryrefslogtreecommitdiff
path: root/components/useAlert.js
diff options
context:
space:
mode:
Diffstat (limited to 'components/useAlert.js')
-rw-r--r--components/useAlert.js6
1 files changed, 4 insertions, 2 deletions
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 };