aboutsummaryrefslogtreecommitdiff
path: root/components/useAlert.js
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-07-16 22:35:39 +0700
committerFactiven <[email protected]>2023-07-16 22:35:39 +0700
commit1eee181e219dfd993d396ac3169e7aad3dd285eb (patch)
tree23fe54e9c3f8810f3ac9ab6b29070b4f0d4b9d20 /components/useAlert.js
parentremoved console.log (diff)
downloadmoopa-1eee181e219dfd993d396ac3169e7aad3dd285eb.tar.xz
moopa-1eee181e219dfd993d396ac3169e7aad3dd285eb.zip
Update v3.6.4
- Added Manga page with a working tracker for AniList user - Added schedule component to home page - Added disqus comment section so you can fight on each other (not recommended) - Added /id and /en route for english and indonesian subs (id route still work in progress)
Diffstat (limited to 'components/useAlert.js')
-rw-r--r--components/useAlert.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/components/useAlert.js b/components/useAlert.js
deleted file mode 100644
index fa82c42..0000000
--- a/components/useAlert.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useState } from "react";
-
-const useAlert = () => {
- const [message, setMessage] = useState("");
- const [type, setType] = useState("");
-
- const showAlert = (message, type = "success") => {
- setMessage(message);
- setType(type);
- setTimeout(() => {
- setMessage("");
- setType("");
- if (type === "success") {
- window.location.reload();
- }
- }, 3000);
- };
-
- return { message, type, showAlert };
-};
-
-export default useAlert;