Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fb9e792
Merge pull request #71 from Curate-Me/develop
dvp-tae Nov 27, 2024
cae75a6
Merge pull request #77 from Curate-Me/develop
dvp-tae Nov 28, 2024
6af808f
Merge pull request #82 from Curate-Me/develop
dvp-tae Nov 28, 2024
05dac00
Merge pull request #85 from Curate-Me/develop
dvp-tae Nov 28, 2024
97ae620
Merge pull request #88 from Curate-Me/develop
dvp-tae Nov 28, 2024
83d8e55
Merge pull request #91 from Curate-Me/develop
dvp-tae Nov 28, 2024
f54b700
Merge pull request #93 from Curate-Me/develop
dvp-tae Nov 28, 2024
7440691
Merge pull request #95 from Curate-Me/develop
dvp-tae Nov 28, 2024
48386b3
feat: 온보딩 로딩 이미지 수정
kimzini Nov 29, 2024
90ce0cb
feat: Claco 기본 설명일 때 화살표 제한
kimzini Nov 29, 2024
791e687
feat: 포스터 클릭해도 상세 페이지로 이동
kimzini Nov 29, 2024
12eaae9
feat: 상세 포스터 화살표 높이 제한
kimzini Nov 29, 2024
9d11afa
feat: 티켓 등록 자동 완성 api 연동
kimzini Nov 29, 2024
409aa14
feat: 공연 날짜 불러오는 로직 수정
kimzini Nov 29, 2024
6171b0f
feat: 티켓 저장 로딩 이미지 수정
kimzini Nov 29, 2024
1f4d082
feat: 티켓 배경색 수정
kimzini Nov 29, 2024
b797c2a
feat: 스켈레톤 UI 수정
kimzini Nov 29, 2024
0209461
feat: 티켓 없는 티켓북 뒤로 가기 추가
kimzini Nov 29, 2024
de4791b
feat: 공연 포스터 크기 통일
kimzini Nov 29, 2024
1272be6
feat: 티켓 상세 여백 수정
kimzini Nov 29, 2024
81f1dc3
feat: 공연 태그 default 설정
kimzini Nov 29, 2024
802e6bb
feat: 선택했던 공연 필터값 보이게 수정
kimzini Nov 29, 2024
040035e
Merge pull request #97 from Curate-Me/feat/#96_qa-3
kimzini Nov 29, 2024
51baeda
fix: 로컬 폰트 함수 제거
dvp-tae Nov 29, 2024
9f9cbe2
feat: 필터 선택 후 탭 선택시 초기화
kimzini Nov 29, 2024
6606e61
feat: base 옵션 추가
kimzini Nov 29, 2024
ffa4384
style: 검색창 X 아이콘 수정
kimzini Nov 29, 2024
52d8c2d
Merge pull request #99 from Curate-Me/feat/#98_qa-4
kimzini Nov 29, 2024
d3ef174
hotfix: base 경로 다시 수정
kimzini Nov 29, 2024
955f5c8
fix: 티켓 등록 후 티켓북 선택 시 티켓 리스트 쿼리 무효화
dvp-tae Nov 29, 2024
4f8156b
Merge pull request #101 from Curate-Me/feat/#98_qa-4
kimzini Nov 29, 2024
3f1c618
fix: 티켓 등록 후 티켓북 선택 시 티켓 리스트 쿼리 무효화
dvp-tae Nov 29, 2024
0b0283a
Merge branch 'main' into hotfix/qa_#6
dvp-tae Nov 29, 2024
afd6722
fix: lint 오류 수정
dvp-tae Nov 29, 2024
e6dbad4
Merge pull request #102 from Curate-Me/hotfix/qa_#6
dvp-tae Nov 29, 2024
9954c5d
fix: 검색바 고치기
dvp-tae Nov 29, 2024
e7c5bc9
Merge pull request #103 from Curate-Me/hotfix/qa_#7
dvp-tae Nov 29, 2024
55ba010
fix: 로그인 리다렉 수정
dvp-tae Nov 29, 2024
798cd39
Merge pull request #104 from Curate-Me/hotfix/qa_#8
dvp-tae Nov 29, 2024
0980224
fix: 에러 핸들링 수정:
dvp-tae Nov 29, 2024
60eea6c
Merge pull request #105 from Curate-Me/hotfix/qa_#9
dvp-tae Nov 29, 2024
7d889fc
feat: 요청 사항 수정
kimzini Nov 29, 2024
600eb03
Merge branch 'main' into feat/#98_qa-4
kimzini Nov 29, 2024
ecac524
Merge pull request #106 from Curate-Me/feat/#98_qa-4
kimzini Nov 29, 2024
74670b8
feat: 로티 이미지 수정
kimzini Nov 29, 2024
80ab364
Merge pull request #107 from Curate-Me/hotfix/qa_#10
kimzini Nov 29, 2024
1cbb59d
hotfix: 그라디언트 추가
kimzini Nov 29, 2024
b4df3e6
Merge pull request #108 from Curate-Me/hotfix/qa_#11
kimzini Nov 29, 2024
be68706
hotfix: 그라디언트 위치 수정
kimzini Nov 29, 2024
d4767f4
Merge pull request #109 from Curate-Me/hotfix/qa_#12
kimzini Nov 29, 2024
aea5649
feat: 티켓북 초기 페이지 수정
kimzini Nov 29, 2024
c386b0e
Merge pull request #110 from Curate-Me/hotfix/qa_#13
kimzini Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/assets/lotties/onboarding-loading.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"assets": [
{ "h": 339, "id": "0", "p": "MagnifierBackground.png", "u": "/dist/assets/images/", "w": 344, "e": 0 },
{ "h": 170, "id": "1", "p": "delicate.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "2", "p": "dynamic.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "3", "p": "familiar.png", "u": "/dist/assets/images/Genre/", "w": 168, "e": 0 },
{ "h": 170, "id": "4", "p": "grand.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "5", "p": "lyrical.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "6", "p": "modern.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "7", "p": "novel.png", "u": "/dist/assets/images/Genre/", "w": 168, "e": 0 },
{ "h": 170, "id": "8", "p": "romantic.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "9", "p": "tragic.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 170, "id": "10", "p": "classical.png", "u": "/dist/assets/images/Genre/", "w": 170, "e": 0 },
{ "h": 339, "id": "0", "p": "MagnifierBackground.png", "u": "https://claco-client.vercel.app/assets/", "w": 344, "e": 0 },
{ "h": 170, "id": "1", "p": "delicate-COgzgCmJ.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "2", "p": "dynamic-DyHv12pT.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "3", "p": "familiar-Dg6qKd33.png", "u": "https://claco-client.vercel.app/assets/", "w": 168, "e": 0 },
{ "h": 170, "id": "4", "p": "grand-BYiR4a-o.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "5", "p": "lyrical-BgxdJF4r.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "6", "p": "modern-CpuftXSH.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "7", "p": "novel-DIk8ha5_.png", "u": "https://claco-client.vercel.app/assets/", "w": 168, "e": 0 },
{ "h": 170, "id": "8", "p": "romantic-o0K20Lyg.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "9", "p": "tragic-5xq7Nqci.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{ "h": 170, "id": "10", "p": "classical-BXnO5iTb.png", "u": "https://claco-client.vercel.app/assets/", "w": 170, "e": 0 },
{
"id": "17",
"layers": [
Expand Down
17 changes: 16 additions & 1 deletion src/components/Browse/ShowFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ export const ShowFilter = ({ onClose, onApply }: ShowFilterProps) => {
const [rangeEnd, setRangeEnd] = useState<Date | null>(null);
const [isVisible, setIsVisible] = useState<boolean>(false);

useEffect(() => {
const savedFilter = localStorage.getItem("filterObj");
if (savedFilter) {
const parsedFilter = JSON.parse(savedFilter);
setMinPrice(parsedFilter.minPrice || 0);
setMaxPrice(parsedFilter.maxPrice || 1000000);
setSelectedLocation(parsedFilter.selectedLocation || []);
setSelectedFeatures(parsedFilter.categories || []);
setRangeStart(
parsedFilter.startDate ? new Date(parsedFilter.startDate) : null,
);
setRangeEnd(parsedFilter.endDate ? new Date(parsedFilter.endDate) : null);
}
}, []);

useEffect(() => {
const timer = setTimeout(() => setIsVisible(true), 50);
return () => clearTimeout(timer);
Expand Down Expand Up @@ -86,7 +101,7 @@ export const ShowFilter = ({ onClose, onApply }: ShowFilterProps) => {
console.log(label);
if (values.every((value) => selectedLocation.includes(value))) {
setSelectedLocation(
selectedLocation.filter((loc) => !values.includes(loc))
selectedLocation.filter((loc) => !values.includes(loc)),
);
} else {
setSelectedLocation([...selectedLocation, ...values]);
Expand Down
58 changes: 36 additions & 22 deletions src/components/ShowDetail/ShowInformation/ShowOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ReactComponent as Megaphone } from "@/assets/svgs/Megaphone.svg";
import { ReactComponent as Book } from "@/assets/svgs/Book.svg";
import { Genre } from "@/components/common/Genre";
import { useNavigate, useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { useEffect, useRef, useState } from "react";
import { ShowCategory } from "@/types";
import { usePostLike } from "@/hooks/mutation";
import { useConcertInfoStore } from "@/libraries/store/concertInfo";
Expand Down Expand Up @@ -52,9 +52,19 @@ const ShowOverview = ({
const navigate = useNavigate();
const [_liked, setLiked] = useState(liked);
const [isExpanded, setIsExpanded] = useState(false);
const [showButton, setShowButton] = useState(false);
const textRef = useRef<HTMLParagraphElement>(null);
const mutation = usePostLike();
const { id } = useParams<{ id: string }>();

useEffect(() => {
if (textRef.current) {
const height = textRef.current.getBoundingClientRect().height;

setShowButton(height > 40);
}
}, [summary]);

const gotoBack = () => {
navigate(-1);
};
Expand Down Expand Up @@ -132,28 +142,32 @@ const ShowOverview = ({
<span className="headline2-bold">Claco 쉬운 공연 설명</span>
</div>

<p
className={`body2-medium text-grayscale-70 mb-[10px] ${
isExpanded ? "" : "line-clamp-2"
}`}
>
{summary || "공연 설명이 없습니다."}
</p>

<button
onClick={toggleExpanded}
className="flex justify-center mb-[17px]"
>
<BackArrow
width="14"
height="14"
viewBox="0 0 11 20"
className={`text-grayscale-60 ${
isExpanded ? "rotate-90" : "-rotate-90"
<div className="flex flex-col items-center justify-center mb-[17px]">
<p
ref={textRef}
className={`body2-medium text-grayscale-70 ${
showButton && !isExpanded ? "line-clamp-2" : "mb-[15px]"
}`}
/>
</button>

>
{summary || ""}
</p>

{showButton && (
<button
onClick={toggleExpanded}
className="flex justify-center mt-[15px]"
>
<BackArrow
width="14"
height="14"
viewBox="0 0 11 20"
className={`text-grayscale-60 ${
isExpanded ? "rotate-90" : "-rotate-90"
}`}
/>
</button>
)}
</div>
<div className="flex space-x-2 items-center mb-[22px]">
<Book />
<span className="headline2-bold">이런 느낌의 공연이에요</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ShowPoster = forwardRef<HTMLDivElement, DetailsInfoSectionProps>(
const checkImageHeight = () => {
if (imageRef.current) {
const imageHeight = imageRef.current.naturalHeight;
setIsImageOverflow(imageHeight > 2000);
setIsImageOverflow(imageHeight > 4000);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/CategoryTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const CategoryTag = ({ categoryType, className }: CategoryTagProps) => {
case "공연예정":
return "border-[1px] border-grayscale-70";
default:
return;
return "border-[1px] border-grayscale-70";
}
};
return (
Expand Down
8 changes: 5 additions & 3 deletions src/components/common/ShowSummaryCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const ShowSummaryCard = ({ data }: ShowSummaryCardProps) => {
<img
src={data.poster}
alt="poster"
className="w-[131px] h-[172px] rounded-[5px] object-cover"
className="w-[123px] h-[172px] rounded-[5px] object-cover"
onClick={() => gotoShowDetail(data.id)}
/>
<div className="absolute top-0 left-0 w-full h-[70px] bg-gradient-to-b from-[rgba(0,0,0,0.40)] to-[rgba(102,102,102,0.00)] pointer-events-none"></div>

Expand All @@ -40,7 +41,7 @@ export const ShowSummaryCard = ({ data }: ShowSummaryCardProps) => {
</div>

<span
className="absolute top-[13px] right-[10px]"
className="absolute top-[13px] right-[10px] z-50"
onClick={handleLike}
>
{isLiked ? (
Expand All @@ -51,7 +52,7 @@ export const ShowSummaryCard = ({ data }: ShowSummaryCardProps) => {
</span>
</div>

<div className="flex flex-col ml-4 max-w-[207px]" onClick={() => gotoShowDetail(data.id)}>
<div className="flex flex-col relative ml-4 max-w-[207px]" onClick={() => gotoShowDetail(data.id)}>
<div className="flex flex-col min-w-[186px]">
<span className="caption-12 self-start mb-[9px]">
<CategoryTag categoryType={data.prfstate} />
Expand Down Expand Up @@ -79,6 +80,7 @@ export const ShowSummaryCard = ({ data }: ShowSummaryCardProps) => {
</span>
))}
</div>
<div className="absolute right-0 bottom-0 w-[63px] h-[26px] bg-gradient-to-r from-transparent to-[#1C1C1C]" />
</div>
</div>
);
Expand Down
7 changes: 1 addition & 6 deletions src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
font-weight: 700;
font-display: swap;
src:
local("Pretendard Bold"),
url("./assets/fonts/Pretendard-Bold.subset.woff2") format("woff2"),
url("./assets/fonts/Pretendard-Bold.subset.woff") format("woff");
}
Expand All @@ -22,7 +21,6 @@
font-weight: 600;
font-display: swap;
src:
local("Pretendard SemiBold"),
url("./assets/fonts/Pretendard-SemiBold.subset.woff2") format("woff2"),
url("./assets/fonts/Pretendard-SemiBold.subset.woff") format("woff");
}
Expand All @@ -32,7 +30,6 @@
font-weight: 500;
font-display: swap;
src:
local("Pretendard Medium"),
url("./assets/fonts/Pretendard-Medium.subset.woff2") format("woff2"),
url("./assets/fonts/Pretendard-Medium.subset.woff") format("woff");
}
Expand All @@ -42,7 +39,6 @@
font-weight: 400;
font-display: swap;
src:
local("Pretendard Regular"),
url("./assets/fonts/Pretendard-Regular.subset.woff2") format("woff2"),
url("./assets/fonts/Pretendard-Regular.subset.woff") format("woff");
}
Expand All @@ -52,7 +48,6 @@
font-weight: 400;
font-display: swap;
src:
local("Nonchalance Medium"),
url("./assets/fonts/Nonchalance-Medium.woff2") format("woff2"),
url("./assets/fonts/Nonchalance-Medium.woff") format("woff");
}
Expand Down Expand Up @@ -273,4 +268,4 @@ input[type="range"]::-webkit-slider-thumb {

.hide-scrollbar::-webkit-scrollbar {
display: none;
}
}
1 change: 1 addition & 0 deletions src/hooks/queries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ export { default as useGetClacoBookList } from "./useGetClacoBookList";
export { default as useGetClacoTicketList } from "./useGetClacoTicketList";
export { default as useGetTicketReviewDetail } from "./useGetTicketReviewDetail";
export { default as useGetConcertLikes } from "./useGetConcertLikes";
export { default as useGetReviewAutoCompleteSearch } from "./useGetReviewAutoCompleteSearch";
30 changes: 30 additions & 0 deletions src/hooks/queries/useGetReviewAutoCompleteSearch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { client } from "@/apis";
import { AutoCompleteSearchResponse } from "@/types";
import { useQuery, UseQueryResult } from "@tanstack/react-query";
import { AxiosError } from "axios";

const getReviewAutoCompleteSearch = async (
query: string,
): Promise<AutoCompleteSearchResponse> => {
const response = await client.get<AutoCompleteSearchResponse>(
"/concerts/reviews/search",
{
params: {
query: query,
},
},
);
return response.data;
};

const useGetReviewAutoCompleteSearch = (
query: string,
): UseQueryResult<AutoCompleteSearchResponse, AxiosError> => {
return useQuery<AutoCompleteSearchResponse, AxiosError>({
queryKey: ["useReviewAutoComplete", query],
queryFn: () => getReviewAutoCompleteSearch(query),
enabled: query.trim().length !== 0,
});
};

export default useGetReviewAutoCompleteSearch;
63 changes: 54 additions & 9 deletions src/hooks/utils/extractSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,80 @@ const extractSchedule = (dtguidance: string): PrfGuidance[] => {
const scheduleEntries = dtguidance.split(", ");
const schedule: PrfGuidance[] = [];

const sortTimes = (times: string[]) => {
return times.sort((a, b) => {
const timeToMinutes = (time: string) => {
const [hours, minutes] = time.split(":").map(Number);
return hours * 60 + minutes;
};
return timeToMinutes(a) - timeToMinutes(b);
});
};

scheduleEntries.forEach((entry) => {
const match = entry.match(/(.*)\((.*)\)/);
if (match) {
let dayRange = match[1].trim();
const times = match[2].split(",").map((time) => time.trim());
const times = sortTimes(match[2].split(",").map((time) => time.trim()));

if (dayRange === "HOL") {
dayRange = "일요일";
}

if (dayRange.includes("~")) {
const [startDay, endDay] = dayRange
.split("~")
.split(" ~ ")
.map((day) => day.trim());
const startDayIndex = daysMap.find((d) => d.day === startDay)?.dayIndex;
const endDayIndex = daysMap.find((d) => d.day === endDay)?.dayIndex;

if (startDayIndex !== undefined && endDayIndex !== undefined) {
for (let i = startDayIndex; i <= endDayIndex; i++) {
const fullDay = daysMap.find((d) => d.dayIndex === i)?.day;
const shortDay = fullDay ? fullDay.slice(0, 1) : null;
if (shortDay && !schedule.some((item) => item.day === shortDay)) {
schedule.push({ day: shortDay, times });
if (startDayIndex <= endDayIndex) {
for (let i = startDayIndex; i <= endDayIndex; i++) {
const fullDay = daysMap.find((d) => d.dayIndex === i)?.day;
const shortDay = fullDay ? fullDay.slice(0, 1) : null;
if (shortDay) {
const existing = schedule.find((item) => item.day === shortDay);
if (existing) {
existing.times = sortTimes([...existing.times, ...times]);
} else {
schedule.push({ day: shortDay, times });
}
}
}
} else {
for (let i = startDayIndex; i < daysMap.length; i++) {
const fullDay = daysMap.find((d) => d.dayIndex === i)?.day;
const shortDay = fullDay ? fullDay.slice(0, 1) : null;
if (shortDay) {
const existing = schedule.find((item) => item.day === shortDay);
if (existing) {
existing.times = sortTimes([...existing.times, ...times]);
} else {
schedule.push({ day: shortDay, times });
}
}
}
for (let i = 0; i <= endDayIndex; i++) {
const fullDay = daysMap.find((d) => d.dayIndex === i)?.day;
const shortDay = fullDay ? fullDay.slice(0, 1) : null;
if (shortDay) {
const existing = schedule.find((item) => item.day === shortDay);
if (existing) {
existing.times = sortTimes([...existing.times, ...times]);
} else {
schedule.push({ day: shortDay, times });
}
}
}
}
}
} else {
const shortDay = dayRange.slice(0, 1);
if (!schedule.some((item) => item.day === shortDay)) {
const existing = schedule.find((item) => item.day === shortDay);
if (existing) {
existing.times = sortTimes([...existing.times, ...times]);
} else {
schedule.push({ day: shortDay, times });
}
}
Expand All @@ -55,4 +100,4 @@ const extractSchedule = (dtguidance: string): PrfGuidance[] => {
return schedule;
};

export default extractSchedule;
export default extractSchedule;
6 changes: 5 additions & 1 deletion src/pages/Browse/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ export const BrowsePage = () => {

const handleTabClick = (tab: TabMenu) => {
setActiveTab(tab);
setIsFilterOn(false);
setFilterValue(null);
localStorage.removeItem("filterObj");
handleRefreshClick();
};

const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -304,7 +308,7 @@ export const BrowsePage = () => {

<div className="flex items-center justify-between gap-3 py-1">
{hasActiveFilters ? (
<div className="flex text-center gap-[5px] pl-1 overflow-x-auto scrollbar-hide">
<div className="flex text-center gap-[5px] pl-1 py-[2px] overflow-x-auto scrollbar-hide">
{filterState.priceRange && (
<div className="rounded-[20px] px-[10px] py-1 border-[0.5px] border-grayscale-60 bg-transparent caption-12 text-grayscale-60 whitespace-nowrap">
{filterState.priceRange}
Expand Down
Loading