Skip to content

Commit

Permalink
Merge pull request #292 from LellowMellow/fix/231213-fix-lecture-revi…
Browse files Browse the repository at this point in the history
…ew-list

Fix(#291): mypage lecture list 데이터 수정
  • Loading branch information
LellowMellow authored Dec 13, 2023
2 parents f571648 + 29804f3 commit 47393d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
11 changes: 4 additions & 7 deletions frontend/src/pages/MyPage/components/MyPageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ import SubLogoOriginal from "@/assets/imgs/subLogoOriginal.png";
const NICKNAME_REGEXP = /^[a-zA-Z0-9가-힣]{3,15}$/;

type Lecture = {
date: string;
duration: string;
user: string;
title: string;
description: string;
presenter_id: { username: string };
_id: string;
};

const MyPageSection = () => {
Expand Down Expand Up @@ -139,12 +138,10 @@ const MyPageSection = () => {
lectureList.map((value, index) => (
<ReplayLectureCard
key={index}
date={value.date}
duration={value.duration}
user={value.user}
user={value.presenter_id.username}
title={value.title}
description={value.description}
onClick={() => navigate("/")}
onClick={() => navigate(`/review?id=${value._id}`)}
/>
))
) : (
Expand Down
20 changes: 9 additions & 11 deletions frontend/src/pages/MyPage/components/ReplayLectureCard.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import ProfileMedium from "@/assets/imgs/profileMedium.png";
import UserIcon from "@/assets/svgs/user.svg?react";
import CalendarIcon from "@/assets/svgs/calendar.svg?react";
import PlayIcon from "@/assets/svgs/play.svg?react";

interface ReplayLectureCardProps {
date: string;
duration: string;
user: string;
title: string;
description: string;
onClick: () => void;
}

const ReplayLectureCard = ({ date, duration, user, title, description, onClick }: ReplayLectureCardProps) => {
const ReplayLectureCard = ({ user, title, description, onClick }: ReplayLectureCardProps) => {
return (
<div
className="flex flex-col w-full p-6 gap-4 justify-between bg-grayscale-white border-default rounded-xl hover:shadow-xl duration-500 cursor-pointer break-keep"
Expand All @@ -30,8 +26,14 @@ const ReplayLectureCard = ({ date, duration, user, title, description, onClick }
</div>

<p className="medium-16 text-grayscale-darkgray">{description}</p>
</div>
);
};

export default ReplayLectureCard;

<div className="flex flex-row justify-between w-full items-center">
/*
<div className="flex flex-row justify-between w-full items-center">
<div className="flex flex-row gap-1 items-center semibold-16 text-boarlog-100">
<CalendarIcon className="w-4 h-4 fill-boarlog-100" />
{date}
Expand All @@ -41,8 +43,4 @@ const ReplayLectureCard = ({ date, duration, user, title, description, onClick }
{duration}
</div>
</div>
</div>
);
};

export default ReplayLectureCard;
*/

0 comments on commit 47393d3

Please sign in to comment.