Skip to content

Commit

Permalink
Merge pull request #284 from TEAM-BEAT/fix/#282/FixMain
Browse files Browse the repository at this point in the history
[Fix/#282] 데모데이 용 - 메인에 당일 공연 나오도록 설정
  • Loading branch information
sinji2102 authored Jul 19, 2024
2 parents 9594da2 + 3a4792a commit 6c01197
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/main/components/performance/Performance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Performance = ({ genre, performanceList = [] }: PerformanceComponentProps)
genre === "ALL" ? performanceList : performanceList.filter((item) => item.genre === genre);

const sortData = filteredData
.filter((item) => item.dueDate! >= 1)
.filter((item) => item.dueDate! >= 0)
.sort((a, b) => a.dueDate! - b.dueDate!);

const data1 = sortData.slice(0, 4);
Expand Down
8 changes: 6 additions & 2 deletions src/pages/main/components/performance/PerformnaceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as S from "./Performance.Cardstyled";
import { useNavigate } from "react-router-dom";

import Labal from "@components/commons/label/Labal";
import { Label } from "@pages/book/components/select/RadioButton.styled";

const PerformnaceCard = ({ ...item }) => {
const navigate = useNavigate();
Expand All @@ -14,10 +15,13 @@ const PerformnaceCard = ({ ...item }) => {
}}
>
<S.PerformanceImg src={item.posterImage} />

{item.dueDate <= 5 ? (
<>
item.dueDate === 0 ? (
<Labal type="today">D-DAY</Labal>
) : (
<Labal type="count">D-{item.dueDate}</Labal>
</>
)
) : null}
<S.PerformanceTitleWrapper>
<S.PerformanceTitle>{item.performanceTitle}</S.PerformanceTitle>
Expand Down

0 comments on commit 6c01197

Please sign in to comment.