diff options
| author | Factiven <[email protected]> | 2023-04-28 13:36:29 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-04-28 13:36:29 +0700 |
| commit | f287e8225892266acf162ba94ee31ce623e06890 (patch) | |
| tree | aca5e4626c78e7d92228f826f9ba4f26397f1559 /components/useAlert.js | |
| parent | Merge pull request #3 from DevanAbinaya/main (diff) | |
| download | moopa-f287e8225892266acf162ba94ee31ce623e06890.tar.xz moopa-f287e8225892266acf162ba94ee31ce623e06890.zip | |
Editor List v0.2
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 }; |