This commit is contained in:
ditiqi 2025-02-24 09:41:48 +08:00
parent eaec8b1829
commit 44c4d152b7
1 changed files with 17 additions and 14 deletions

View File

@ -27,7 +27,7 @@ export const CourseDetailDisplayArea: React.FC = () => {
{lectureIsLoading && (
<Skeleton active paragraph={{ rows: 4 }} title={false} />
)}
{!selectedLectureId && (
{!selectedLectureId && !lectureIsLoading && (
<>
<div className="flex justify-center flex-col items-center gap-2 w-full my-2 px-4">
<div className="w-full bg-white shadow-md rounded-lg border border-gray-200 p-6 ">
@ -36,20 +36,23 @@ export const CourseDetailDisplayArea: React.FC = () => {
</div>
</>
)}
{!lectureIsLoading && lecture?.meta?.type === LectureType.VIDEO && (
<div className="flex justify-center flex-col items-center gap-2 w-full mt-2 px-4">
<motion.div
style={{
opacity: videoOpacity,
}}
className="w-full bg-black rounded-lg ">
<div className=" w-full ">
<VideoPlayer src={lecture?.meta?.videoUrl} />
</div>
</motion.div>
</div>
)}
{selectedLectureId &&
!lectureIsLoading &&
lecture?.meta?.type === LectureType.VIDEO && (
<div className="flex justify-center flex-col items-center gap-2 w-full mt-2 px-4">
<motion.div
style={{
opacity: videoOpacity,
}}
className="w-full bg-black rounded-lg ">
<div className=" w-full ">
<VideoPlayer src={lecture?.meta?.videoUrl} />
</div>
</motion.div>
</div>
)}
{!lectureIsLoading &&
selectedLectureId &&
lecture?.meta?.type === LectureType.ARTICLE && (
<div className="flex justify-center flex-col items-center gap-2 w-full my-2 px-4">
<div className="w-full bg-white shadow-md rounded-lg border border-gray-200 p-6 ">