From 5f2f23eeb62c390182334394a4306b0eda287ffa Mon Sep 17 00:00:00 2001 From: Factiven Date: Tue, 2 May 2023 14:17:51 +0700 Subject: Update pre - v3.5.4 > UI adjustment on smaller devices --- pages/anime/[...id].js | 22 +++++--- pages/anime/watch/[...info].js | 6 +- pages/categories/[id].js | 125 ----------------------------------------- pages/contact.js | 4 +- pages/index.js | 4 +- 5 files changed, 21 insertions(+), 140 deletions(-) delete mode 100644 pages/categories/[id].js (limited to 'pages') diff --git a/pages/anime/[...id].js b/pages/anime/[...id].js index 26c42cb..4b759b6 100644 --- a/pages/anime/[...id].js +++ b/pages/anime/[...id].js @@ -447,21 +447,25 @@ export default function Info() { )} -
-
+
+
{info && info.status !== "NOT_YET_RELEASED" ? ( <> -
+

{info?.type}

-
+

{info?.averageScore}%

-
+
-

{info?.episodes} Episodes

+ {info?.episodes ? ( +

{info?.episodes} Episodes

+ ) : ( +

TBA

+ )}
) : ( @@ -676,8 +680,8 @@ export default function Info() { )} {info?.nextAiringEpisode && (
-
-

Next Ep :

+
+

Next :

{epiStatus} while retrieving data

diff --git a/pages/anime/watch/[...info].js b/pages/anime/watch/[...info].js
index 682e252..41635b8 100644
--- a/pages/anime/watch/[...info].js
+++ b/pages/anime/watch/[...info].js
@@ -288,7 +288,7 @@ export default function Info({ sessions, id, aniId, provider }) {
           
{loading ? ( -
+
) : ( -
+
)}
{data ? ( @@ -386,7 +386,7 @@ export default function Info({ sessions, id, aniId, provider }) {
{data ? data.studios : }
-
+
setOpen(true)}> { - setLoading(true); - if (tags === "This Season") { - seasonNow(); - setLoading(false); - } else if (tags === "Popular Anime") { - PopularAnime(); - setLoading(false); - } else if (tags === "Popular Manga") { - PopularManga(); - setLoading(false); - } else { - setData(null); - setLoading(false); - } - }, [id]); - - async function seasonNow() { - const data = await aniAdvanceSearch({ - perPage: 25, - seasonYear: 2023, - season: getCurrentSeason(), - // type: "MANGA", - }); - setData(data); - } - - async function PopularAnime() { - const data = await aniAdvanceSearch({ - perPage: 25, - sort: ["POPULARITY_DESC"], - }); - setData(data); - } - - async function PopularManga() { - const data = await aniAdvanceSearch({ - perPage: 25, - sort: ["POPULARITY_DESC"], - type: "MANGA", - }); - setData(data); - } - - console.log(data); - return ( - <> - - Categories - {tags} - -
-
- {loading ? ( -

Loading...

- ) : ( - data && - data?.media.map((m) => { - return ( -
- image -
- ); - }) - )} -
-
-
- - ); -} - -function getYear() { - const now = new Date(); - return now.getFullYear(); -} - -function getCurrentSeason() { - const now = new Date(); - const month = now.getMonth() + 1; // getMonth() returns 0-based index - - switch (month) { - case 12: - case 1: - case 2: - return "WINTER"; - case 3: - case 4: - case 5: - return "SPRING"; - case 6: - case 7: - case 8: - return "SUMMER"; - case 9: - case 10: - case 11: - return "FALL"; - default: - return "UNKNOWN SEASON"; - } -} diff --git a/pages/contact.js b/pages/contact.js index 7dbc6d1..c7da878 100644 --- a/pages/contact.js +++ b/pages/contact.js @@ -7,7 +7,9 @@ const Contact = () => {

Contact Us

If you have any questions or comments, please email us at:

- factiven.org@gmail.com + + contact@moopa.live +

diff --git a/pages/index.js b/pages/index.js index 6295dee..fcf8288 100644 --- a/pages/index.js +++ b/pages/index.js @@ -86,9 +86,9 @@ export function Navigasi() { placeholder="Search Anime" onKeyDown={handleKeyDown} /> - +
- +
-- cgit v1.2.3