diff --git a/.prettierrc.json b/.prettierrc.json index 08df606..08f9b57 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,5 @@ { "bracketSpacing": true, - "printWidth": 80 + "printWidth": 80, + "trailingComma": "none" } diff --git a/pages/en/schedule/index.tsx b/pages/en/schedule/index.tsx index 42a28c6..f116b7c 100644 --- a/pages/en/schedule/index.tsx +++ b/pages/en/schedule/index.tsx @@ -1,6 +1,7 @@ // @ts-nocheck import Image from "next/image"; +import { cubicBezier, motion } from "framer-motion"; import { useEffect, useRef, useState } from "react"; import Link from "next/link"; import { CalendarIcon } from "@heroicons/react/24/solid"; @@ -11,7 +12,7 @@ import { filterFormattedSchedule, filterScheduleByDay, sortScheduleByDay, - transformSchedule, + transformSchedule } from "@/utils/schedulesUtils"; import { scheduleQuery } from "@/lib/graphql/query"; @@ -28,7 +29,7 @@ const day = [ "Wednesday", "Thursday", "Friday", - "Saturday", + "Saturday" ]; const isAired = (timestamp: number | null) => { @@ -68,9 +69,9 @@ export async function getServerSideProps() { return { props: { - schedule: scheduleByDay, + schedule: scheduleByDay // today: todaySchedule, - }, + } }; } else { now.setHours(0, 0, 0, 0); // Set the time to 00:00:00.000 @@ -88,16 +89,16 @@ export async function getServerSideProps() { method: "POST", headers: { "Content-Type": "application/json", - Accept: "application/json", + Accept: "application/json" }, body: JSON.stringify({ query: scheduleQuery, variables: { weekStart, weekEnd, - page, - }, - }), + page + } + }) }); const json = await res.json(); @@ -113,7 +114,7 @@ export async function getServerSideProps() { const timestampToDay = (timestamp: number) => { return new Date(timestamp * 1000).toLocaleDateString(undefined, { - weekday: "long", + weekday: "long" }); }; @@ -137,9 +138,9 @@ export async function getServerSideProps() { return { props: { - schedule: scheduleByDay, + schedule: scheduleByDay // today: todaySchedule, - }, + } }; } // setSchedule(scheduleByDay); @@ -267,11 +268,11 @@ export default function Schedule({ schedule }: any) {
- -
- -
-
+ {/* +
+ */} +
+
    -

    +

    {day}

    {Object.entries(timeSlots).map(([time, animeList]) => ( -
    -
    + ))}
)) @@ -402,7 +417,7 @@ export default function Schedule({ schedule }: any) {

{day}

-
+ {schedules.map((s) => { const m = s.media; @@ -470,7 +499,7 @@ export default function Schedule({ schedule }: any) { ); })} -
+
) )