diff --git a/src/components/CourseListing.tsx b/src/components/CourseListing.tsx index 514386888c1d51afe3f4369781cdae6b16f9337c..be089d9569df7cbb120c94e52d7da08612a9aded 100644 --- a/src/components/CourseListing.tsx +++ b/src/components/CourseListing.tsx @@ -16,8 +16,7 @@ import type { GetCourseResponse, lecture } from "@/api/api_v1_types"; import { ResourceType } from "@/misc/PromiseHelpers"; import { AuthenticationMethodIcons } from "@/misc/Util"; import { useLanguage } from "./LanguageProvider"; -import { DateTime } from "luxon"; -import LiveLabel, { LectureLiveLabel } from "./LiveLabel"; +import { LectureLiveLabel } from "./LiveLabel"; function ListingHeader({ course }: { course: GetCourseResponse }) { const { editMode } = useEditMode(); diff --git a/src/components/VideoCard.tsx b/src/components/VideoCard.tsx index fe176294b1b22c4c0643f97d320e4c886425a20f..c6766c257c0bc81324e2e4e04e7f4aba37098ac5 100644 --- a/src/components/VideoCard.tsx +++ b/src/components/VideoCard.tsx @@ -5,7 +5,7 @@ import type { lecture, course } from "@/api/api_v1_types"; import { StylizedText } from "@/components/StylizedText"; import { urlForLecture } from "@/misc/Util"; import { useLanguage } from "./LanguageProvider"; -import LiveLabel, { LectureLiveLabel } from "./LiveLabel"; +import { LectureLiveLabel } from "./LiveLabel"; export function VideoCard({ lecture, @@ -78,7 +78,7 @@ export function VideoCard({ </li> <li> <strong>{course.full_name}</strong> - {typeof lecture.livestream_url === "string" && <LiveLabel nowlive={true} />} + <LectureLiveLabel lecture={lecture} /> </li> <li>{dateStr}</li> {lecture.speaker ? ( diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c97fb61f70af30b4ce443503621aeced6d533aaa..e9da8aa69397fd72dab1b6838f6ec1efb52e24fa 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -20,7 +20,7 @@ import { useLanguage } from "@/components/LanguageProvider"; import { useSearchParams } from "next/navigation"; import { useRouter } from "next/router"; import { VideoCard } from "@/components/VideoCard"; -import LiveLabel, { LectureLiveLabel } from "@/components/LiveLabel"; +import { LectureLiveLabel } from "@/components/LiveLabel"; function FeatureCard({ data, all_featured }: { data: featured; all_featured: featured[] }) { const { editMode } = useEditMode();