Skip to content

Commit 1c98b45

Browse files
committed
feat: 본선 영상 추가
1 parent 697f717 commit 1c98b45

4 files changed

Lines changed: 82 additions & 85 deletions

File tree

src/views/home/ui/HomePage/index.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const ReservationFifthSection = dynamic(() => import("@/widgets/main/Reservation
1515
ssr: false,
1616
});
1717

18-
const FinalsSixthSection = dynamic(() => import("@/widgets/main/FinalsSixthSection"), {
19-
loading: () => <SectionPlaceholder />,
20-
ssr: false,
21-
});
18+
// const FinalsSixthSection = dynamic(() => import("@/widgets/main/FinalsSixthSection"), {
19+
// loading: () => <SectionPlaceholder />,
20+
// ssr: false,
21+
// });
2222

2323
const SeventhSection = dynamic(() => import("@/widgets/main/SevenSection"), {
2424
loading: () => <SectionPlaceholder />,
@@ -53,12 +53,13 @@ const HomePage = () => {
5353
<PreliminaryFourthSection />
5454
</LazySection>
5555

56+
{/*
5657
<LazySection fallback={<SectionPlaceholder height="500px" />} rootMargin="300px">
57-
<ReservationFifthSection />
58-
</LazySection>
58+
<FinalsSixthSection />
59+
</LazySection> */}
5960

6061
<LazySection fallback={<SectionPlaceholder height="500px" />} rootMargin="300px">
61-
<FinalsSixthSection />
62+
<ReservationFifthSection />
6263
</LazySection>
6364

6465
<LazySection fallback={<SectionPlaceholder height="500px" />} rootMargin="300px">

src/views/rank/ui/RankView/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,30 @@ const RANK_DATA: RankData[] = [
2020
team_name: "구각와니",
2121
popularity_award: false,
2222
},
23-
23+
2424
{
2525
ranking: 3,
2626
team_name: "ALL",
2727
popularity_award: false,
2828
},
29-
29+
3030
{
3131
ranking: 4,
3232
team_name: "신준",
3333
popularity_award: false,
3434
},
35-
35+
3636
{
3737
ranking: 5,
3838
team_name: "신가밴드",
3939
popularity_award: true,
4040
},
41-
41+
4242
{
4343
ranking: 6,
4444
team_name: "정은서",
4545
popularity_award: true,
4646
},
47-
4847
];
4948

5049
export default function RankView() {

src/widgets/main/PreliminaryFourthSection/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { cn } from "@/shared/utils/cn";
33
import { SectionTitle } from "@/shared/ui/SectionTitle";
44
import ImageCarousel from "@/entities/home/ui/ImageCarousel";
5-
import Image from "next/image";
65
import YouTubeLazyEmbed from "@/shared/ui/YouTubeLazyEmbed";
76

87
// const SLIDES_1 = [
@@ -44,8 +43,6 @@ const SLIDES_3 = [
4443
"/images/26일/13.jpg",
4544
];
4645

47-
const TEAMS_IMAGE = "/images/본선.png";
48-
4946
const PreliminaryFourthSection = () => {
5047
return (
5148
<section id="PreliminaryFourthSection" className={cn("flex flex-col items-center")}>
@@ -127,11 +124,11 @@ const PreliminaryFourthSection = () => {
127124

128125
<div
129126
className={cn(
130-
"flex w-full items-center gap-10 justify-center mobile:flex-col mobile:mb-[38px] mb-32",
127+
"flex w-full flex-col items-start gap-10 justify-between mb-[90px] mobile:mb-[38px]",
131128
)}
132129
>
133-
<div className={cn("w-[50%] mobile:w-full mobile:mt-16 flex justify-center px-8")}>
134-
<Image src={TEAMS_IMAGE} alt="본선 진출팀" width={500} height={500} />
130+
<div className={cn("w-full mobile:w-full mobile:mt-16 mobile:px-16")}>
131+
<YouTubeLazyEmbed videoId="J-Bj9cM4c3M" title="2025 광탈페 본선 다시보기" />
135132
</div>
136133
</div>
137134
</div>

src/widgets/main/ReservationFifthSection/index.tsx

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
11
"use client";
22

33
import Image from "next/image";
4-
import { useEffect, useState } from "react";
4+
// import { useEffect, useState } from "react";
55
import { cn } from "@/shared/utils/cn";
66
import { SectionTitle } from "@/shared/ui/SectionTitle";
77
import Button from "@/shared/ui/Button";
8-
import { redirect } from "next/navigation";
9-
import { ticketOpenDate, performerTicketOpenDate } from "@/shared/config/authConfig";
10-
import { useMySeat } from "@/entities/booking/lib/useMySeat";
11-
import { getTokenFromCookie } from "@/shared/utils/auth";
8+
// import { redirect } from "next/navigation";
9+
// import { ticketOpenDate, performerTicketOpenDate } from "@/shared/config/authConfig";
10+
// import { useMySeat } from "@/entities/booking/lib/useMySeat";
11+
// import { getTokenFromCookie } from "@/shared/utils/auth";
1212
// import { isLoggedIn } from "@/shared/utils/auth";
1313

14-
const formatDateLeft = (timeLeft: number) => {
15-
const DAY = 1000 * 60 * 60 * 24;
16-
const HOUR = 1000 * 60 * 60;
17-
const MIN = 1000 * 60;
18-
const SEC = 1000;
19-
if (timeLeft < DAY) {
20-
if (timeLeft < HOUR) {
21-
return `${String(Math.floor(timeLeft / MIN)).padStart(2, "0")}${String(Math.floor((timeLeft % MIN) / SEC)).padStart(2, "0")}초 후`;
22-
} else {
23-
return `${String(Math.floor(timeLeft / HOUR)).padStart(2, "0")}시간 후`;
24-
}
25-
} else {
26-
return `D-${Math.round(timeLeft / DAY)}`;
27-
}
28-
};
14+
// const formatDateLeft = (timeLeft: number) => {
15+
// const DAY = 1000 * 60 * 60 * 24;
16+
// const HOUR = 1000 * 60 * 60;
17+
// const MIN = 1000 * 60;
18+
// const SEC = 1000;
19+
// if (timeLeft < DAY) {
20+
// if (timeLeft < HOUR) {
21+
// return `${String(Math.floor(timeLeft / MIN)).padStart(2, "0")}분 ${String(Math.floor((timeLeft % MIN) / SEC)).padStart(2, "0")}초 후`;
22+
// } else {
23+
// return `${String(Math.floor(timeLeft / HOUR)).padStart(2, "0")}시간 후`;
24+
// }
25+
// } else {
26+
// return `D-${Math.round(timeLeft / DAY)}`;
27+
// }
28+
// };
2929

3030
const ReservationFifthSection = () => {
31-
const [timeLeft, setTimeLeft] = useState<number>(0);
32-
const [userRole, setUserRole] = useState<string | null>(null);
33-
const { data: mySeat, refetch: refetchMySeat } = useMySeat();
31+
// const [timeLeft, setTimeLeft] = useState<number>(0);
32+
// const [userRole, setUserRole] = useState<string | null>(null);
33+
// const { data: mySeat, refetch: refetchMySeat } = useMySeat();
3434

35-
useEffect(() => {
36-
const updateUserRole = () => {
37-
if (typeof window !== "undefined") {
38-
const role = getTokenFromCookie("role");
39-
setUserRole(role);
40-
}
41-
};
35+
// useEffect(() => {
36+
// const updateUserRole = () => {
37+
// if (typeof window !== "undefined") {
38+
// const role = getTokenFromCookie("role");
39+
// setUserRole(role);
40+
// }
41+
// };
4242

43-
updateUserRole();
43+
// updateUserRole();
4444

45-
const handleStorageChange = () => {
46-
updateUserRole();
47-
refetchMySeat();
48-
};
45+
// const handleStorageChange = () => {
46+
// updateUserRole();
47+
// refetchMySeat();
48+
// };
4949

50-
window.addEventListener("storage", handleStorageChange);
50+
// window.addEventListener("storage", handleStorageChange);
5151

52-
const handleFocus = () => {
53-
updateUserRole();
54-
refetchMySeat();
55-
};
52+
// const handleFocus = () => {
53+
// updateUserRole();
54+
// refetchMySeat();
55+
// };
5656

57-
window.addEventListener("focus", handleFocus);
57+
// window.addEventListener("focus", handleFocus);
5858

59-
return () => {
60-
window.removeEventListener("storage", handleStorageChange);
61-
window.removeEventListener("focus", handleFocus);
62-
};
63-
}, [refetchMySeat]);
59+
// return () => {
60+
// window.removeEventListener("storage", handleStorageChange);
61+
// window.removeEventListener("focus", handleFocus);
62+
// };
63+
// }, []);
6464

65-
useEffect(() => {
66-
const calculateTimeLeft = () => {
67-
const now = new Date();
68-
const relevantTicketOpenDate =
69-
userRole === "ROLE_PERFORMER" ? performerTicketOpenDate : ticketOpenDate;
70-
const difference = relevantTicketOpenDate.getTime() - now.getTime();
71-
setTimeLeft(difference > 0 ? difference : 0);
72-
};
65+
// useEffect(() => {
66+
// const calculateTimeLeft = () => {
67+
// const now = new Date();
68+
// const relevantTicketOpenDate =
69+
// userRole === "ROLE_PERFORMER" ? performerTicketOpenDate : ticketOpenDate;
70+
// const difference = relevantTicketOpenDate.getTime() - now.getTime();
71+
// setTimeLeft(difference > 0 ? difference : 0);
72+
// };
7373

74-
calculateTimeLeft();
74+
// calculateTimeLeft();
7575

76-
const timer = setInterval(calculateTimeLeft, 1000);
76+
// const timer = setInterval(calculateTimeLeft, 1000);
7777

78-
return () => clearInterval(timer);
79-
}, [userRole]);
78+
// return () => clearInterval(timer);
79+
// }, [userRole]);
8080

8181
return (
8282
<section
8383
id="ReservationFifthSection"
8484
className={cn(
85-
"relative h-full max-h-[600px] bg-main-100 overflow-hidden tablet:h-[800px] justify-items-center mt-20",
85+
"relative h-full max-h-[600px] bg-main-100 overflow-hidden justify-items-center mt-20",
8686
)}
8787
>
8888
<div className={cn("z-0")}>
@@ -109,15 +109,14 @@ const ReservationFifthSection = () => {
109109
</div>
110110

111111
<div className={cn("relative w-full text-center mt-[66px] mobile:mt-[2rem]")}>
112-
<SectionTitle title="본선 좌석예매" className="mb-28" />
112+
<SectionTitle title="본선 수상팀 명단" className="mb-28" />
113113
<div
114114
className={cn(
115-
"flex flex-col gap-[40px] mb-[60px] bg-white rounded-[12px] py-[72px] px-[60px] text-center w-[376px] mobile:p-[24px] mobile:w-fit justify-self-center mx-auto mobile:mb-[15px] mobile:gap-[24px]",
115+
"w-full max-w-[720px] flex flex-col gap-[40px] mb-[60px] bg-white rounded-[12px] p-[2%] text-center mobile:p-[24px] mobile:w-full justify-self-center mx-auto mobile:mb-[15px] mobile:gap-[24px]",
116116
)}
117117
>
118-
<p className={cn("text-body1b mobile:text-caption1b")}>티켓오픈안내</p>
119-
<div className={cn("text-title1b text-main-600 mobile:text-body1b")}>
120-
{timeLeft > 0 ? (
118+
{/* <div className={cn("text-title1b text-main-600 mobile:text-body1b")}>
119+
{/* {timeLeft > 0 ? (
121120
formatDateLeft(timeLeft)
122121
) : mySeat && userRole === "ROLE_PERFORMER" ? (
123122
<div className="flex gap-2 w-full">
@@ -148,9 +147,10 @@ const ReservationFifthSection = () => {
148147
{mySeat ? "내 좌석 보러가기" : "예매하기"}
149148
</Button>
150149
)}
151-
</div>
150+
</div> */}
151+
<Button className="w-full">결과 보러가기</Button>
152152

153-
<div className={cn("flex justify-center gap-4 items-center")}>
153+
{/* <div className={cn("flex justify-center gap-4 items-center")}>
154154
<span className={cn("text-body2r mobile:text-caption2r")}>티켓오픈</span>
155155
<span className={cn("text-body2r text-gray-500 mobile:text-caption2r")}>
156156
{(userRole === "ROLE_PERFORMER"
@@ -168,7 +168,7 @@ const ReservationFifthSection = () => {
168168
</div>
169169
<span className={cn("text-body2b text-main-600 mobile:text-caption2b")}>
170170
현장에서 실물티켓으로 교환 후 입장 가능합니다.
171-
</span>
171+
</span> */}
172172
</div>
173173
</div>
174174
</section>

0 commit comments

Comments
 (0)