diff --git a/src/app/page.tsx b/src/app/page.tsx index e799994..dba6de5 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -60,15 +60,16 @@ export default async function page() { - {/* }> - - */} - + - + }> + + }> + + ) } diff --git a/src/components/AiringSchedule.tsx b/src/components/AiringSchedule.tsx index c3b8155..817493c 100644 --- a/src/components/AiringSchedule.tsx +++ b/src/components/AiringSchedule.tsx @@ -5,30 +5,37 @@ const getAiringSchedule = async () => { try { const response = await fetch(`https://api.anify.tv/schedule?apikey=${process.env.NEXT_PUBLIC_ANIFY_KEY}`,{ cache : "no-cache" - }) - return response.json() + }); + return response.json(); } catch (error) { - console.error("Error getting airing list: ", error) + console.error("Error getting airing list: ", error); return []; } } export default async function AiringSchedule() { - const Airing = await getAiringSchedule() + const Airing = await getAiringSchedule(); + + const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + const currentDayIndex = new Date().getDay(); + const currentDay = daysOfWeek[currentDayIndex]; + return ( -
-

Airing

-
-
-
-

Coming Up Next!

- {Object.keys(Airing).map((day) => ( -

{day.split("Schedule")}

- ))} +
+

Airing

+
+
+
+

Coming Up Next!

+ +
+ Previous + {currentDay} + Next
+
); }; - diff --git a/src/components/ScrollToTop.tsx b/src/components/ScrollToTop.tsx index 55bb9ea..2a1a85a 100644 --- a/src/components/ScrollToTop.tsx +++ b/src/components/ScrollToTop.tsx @@ -26,8 +26,7 @@ const ScrollToTop = () => { <>
+ bg-white/30 backdrop-blur-lg z-10 right-5 md:bottom-10 bottom-32 rounded-full p-5 shadow-black shadow-lg`}>
diff --git a/src/loading/AiringScheduleLoading.tsx b/src/loading/AiringScheduleLoading.tsx index 00a149c..50f63fe 100644 --- a/src/loading/AiringScheduleLoading.tsx +++ b/src/loading/AiringScheduleLoading.tsx @@ -1,11 +1,13 @@ import React from 'react' +import SpinLoading from './SpinLoading' const AiringScheduleLoading = () => { return (

Airing

-
+
+