diff options
| author | Factiven <[email protected]> | 2023-05-01 01:24:24 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-01 01:24:24 +0700 |
| commit | f026ac4ffc988c6de085a14e0eb0dc28fffe5482 (patch) | |
| tree | 7fa872b8d6dd3cc3c93c7a53f4475ad7b9db7a0a /components/useAlert.js | |
| parent | Merge branch 'pre-production' into main (diff) | |
| parent | Update v3.5 (diff) | |
| download | moopa-f026ac4ffc988c6de085a14e0eb0dc28fffe5482.tar.xz moopa-f026ac4ffc988c6de085a14e0eb0dc28fffe5482.zip | |
Update v3.5
Diffstat (limited to 'components/useAlert.js')
| -rw-r--r-- | components/useAlert.js | 6 |
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 }; |