Skip to content
Merged

Dev #154

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
44574c6
Feat: 상세페이지 안내 및 리뷰 탭 구현
hankim0904 Sep 8, 2024
40bf7e2
Refactor: 상세페이지 관련 폴더 구조 정리
hankim0904 Sep 8, 2024
52837de
Feat: 상세페이지 여행정보 부분 일부 구현
hankim0904 Sep 8, 2024
2358e6f
Feat: 상세페이지 경로 정보 부분 destinationCard 컴포넌트 제작
hankim0904 Sep 8, 2024
3ca0f8b
Feat: 상세페이지 경로 정보 부분 TransitTimeChip 제작
hankim0904 Sep 8, 2024
4d61b1e
Feat: 코스 상세페이지에서 날짜별 버튼을 누르면 해당 여행지및 지도에 경로가 나오는 기능 구혀
hankim0904 Sep 8, 2024
204fcd7
Feat: 날짜를 누르면 해당 날의 모든 경로가 한눈에 보이게 하는 기능 구현
hankim0904 Sep 8, 2024
f6b53f1
Feat: 여행지 클릭 시 해당 여행지가 지도에서 확대되는 기능 구현
hankim0904 Sep 8, 2024
740e77c
Feat: 교통 수단 선택 토글 버튼 제작
hankim0904 Sep 9, 2024
baa7778
Feat: 지도 위 마커 디자인 구현
hankim0904 Sep 10, 2024
727828e
Feat: 상세페이지 관련 컴포넌트 경로 변경 및 반응형, 스타일 구현
hankim0904 Sep 10, 2024
81c4df8
Fix: 카드 그림자 잘림 현상 및 스크롤바 디자인 변경
hankim0904 Sep 11, 2024
78b2108
Feat: 상세페이지 카드 관련 반응형 UI 구현
hankim0904 Sep 11, 2024
3bc9a30
Feat: 상세페이지 지도 및 카드 관련 반응형 구현
hankim0904 Sep 11, 2024
6422ebf
Feat: 상세페이지 description 부분 구현
hankim0904 Sep 13, 2024
614b791
Feat: 상세페이지 리뷰 탭 헤더 및 form 구현
hankim0904 Sep 14, 2024
757b06b
Feat: 상세 페이지 리뷰 부분 구현 스타일 구현
hankim0904 Sep 14, 2024
86f000a
Feat: 상세페이지 리뷰 카드 구현
hankim0904 Sep 14, 2024
40fcb55
Feat: 이미지 모달 기능 구현
hankim0904 Sep 14, 2024
8a3c28b
Feat: 리뷰 카드 반응형 구현
hankim0904 Sep 15, 2024
397dc42
Feat: 리뷰 영역 반응형 구현
hankim0904 Sep 15, 2024
03167a7
Feat: 리뷰 정보 api 연결
hankim0904 Sep 15, 2024
23900e8
Feat: 리뷰 좋아요 기능 구현
hankim0904 Sep 15, 2024
90c7694
Feat: 비로그인시 리뷰 작성 제한 기능 구현
hankim0904 Sep 15, 2024
ac1484e
Feat: 리뷰 무한스크롤 기능 구현
hankim0904 Sep 15, 2024
ffa7343
Feat: 상세페이지 리뷰 수정 기능 구현
hankim0904 Sep 16, 2024
979375e
Feat: 리뷰 삭제 기능 구현
hankim0904 Sep 16, 2024
0598376
Fix: 빌드 오류 수정
hankim0904 Sep 16, 2024
3bb2a63
Feat: 여행지 상세페이지 헤더 구현
hankim0904 Sep 19, 2024
d20fa01
Feat: 여행지 상세페이지 메인 구현
hankim0904 Sep 19, 2024
e1218f2
Feat: 토스트 스타일 버그 해결
hankim0904 Sep 19, 2024
af3d0f0
Feat: api data에 따라 메인 이미지 로고 여부 설정
hankim0904 Sep 19, 2024
4e4794c
Fix: 여행지 및 코스 삭제 시 뒤로 가기 방지
hankim0904 Sep 19, 2024
1a4e7b5
Feat: 작성자를 한국관광공사로 표시
hankim0904 Sep 21, 2024
014ce5c
Fix: quill 스타일 적용 안되는 부분 적용
hankim0904 Sep 23, 2024
1b5005b
Feat: api content 표시 및 content 없을 떄 UI 구현
hankim0904 Sep 23, 2024
ec7eaab
Fix: 리뷰 관련 api 변경 사항 반영
hankim0904 Sep 23, 2024
6cf98fd
Feat: 여행지 리뷰 api 연결
hankim0904 Sep 23, 2024
849cd4d
Fix: 빌드 오류 및 버그 수정
hankim0904 Sep 23, 2024
7c7a884
Fix: 리뷰 수정 시 포커스가 옮겨 가도록 수정
hankim0904 Sep 23, 2024
a4fcf4e
Chore: "리액트 훅폼 devtool 라이브러리 추가"
lee-ji-hong Sep 14, 2024
a13af61
Feat: "코스 등록 UI 및 기능 구현"
lee-ji-hong Sep 14, 2024
c157810
Feat: "코스 등록, 수정 api 연동"
lee-ji-hong Sep 14, 2024
7552bcd
Feat: "필요없는 코드 삭제"
lee-ji-hong Sep 14, 2024
eb4c6fa
Feat: "build 에러 수정"
lee-ji-hong Sep 14, 2024
96c312e
Feat: "타입명 수정 및 경로 추가 컴포넌트 생성"
lee-ji-hong Sep 24, 2024
be38ccf
Feat: "경로 수정 데이터 연동"
lee-ji-hong Sep 24, 2024
ddfbb3b
Feat: "경로 수정 모달 UI 및 데이터 연동"
lee-ji-hong Sep 25, 2024
310db4a
Feat: "경로 설정 모달 창에서 날짜별 여행지 추가 기능 구현"
lee-ji-hong Sep 25, 2024
bd32c5f
Feat: "build test"
lee-ji-hong Sep 25, 2024
9464b3b
Feat: "필요없는 데이터 삭제"
lee-ji-hong Sep 25, 2024
0cd81ba
Feat: "build error "
lee-ji-hong Sep 26, 2024
1b232f0
Feat: "여행기간, 인원 옵션 버튼 type 수정"
lee-ji-hong Sep 27, 2024
684c6dc
Feat: "폼 제출 시 중복 제출 비허용"
lee-ji-hong Sep 27, 2024
f1677eb
Feat: "경로 설정 예외처리"
lee-ji-hong Sep 27, 2024
4286dc6
Feat: "로딩 스켈레톤 추가"
lee-ji-hong Sep 27, 2024
6af266a
Feat: "selectedDate 모달창 연동"
lee-ji-hong Sep 27, 2024
b517725
Feat: "여행지 추가 아이콘 변경"
lee-ji-hong Sep 27, 2024
a89607b
Feat: "경로 설정 토글기능 안되는 이슈 해결"
lee-ji-hong Sep 27, 2024
ec179e1
Feat: "해당 날짜의 목적지 개수 기준으로 visitOrder 설정"
lee-ji-hong Sep 27, 2024
686215c
Feat: "여행지 조회 인피니트 스크롤"
lee-ji-hong Sep 27, 2024
96d4a29
Feat: "경로 설정 모달 컴포넌트 분리"
lee-ji-hong Sep 29, 2024
6cf2c87
Feat: "필요없는 consoloe 지우기"
lee-ji-hong Sep 29, 2024
f564332
Feat: "타입 이슈 수정"
lee-ji-hong Sep 29, 2024
1b50b45
Feat: "css 수정"
lee-ji-hong Sep 29, 2024
45d80b1
Feat: "경로 설정 여행지 삭제 기능 추가"
lee-ji-hong Sep 29, 2024
ea0b273
Feat: "서브 컴포넌트 분리"
lee-ji-hong Sep 29, 2024
e04b4c5
Feat: 마이페이지 페이지 생성
hankim0904 Sep 28, 2024
fc866bd
Feat: 마이페이지 구현
hankim0904 Sep 28, 2024
960ed3b
Fix: 회원가입 페이지 약관 동의 alert 구현
hankim0904 Sep 30, 2024
e1caf55
Fix: 리뷰 이미지 첨부 시 중복 이미지 허용 및 이미지 사이즈 제한 설정
hankim0904 Sep 30, 2024
282f8d7
Fix: url 복사 기능 제거
hankim0904 Sep 30, 2024
3703bef
Fix: 상세페이지 별점 평균으로 교체
hankim0904 Sep 30, 2024
12c4db2
Fix: 카카오 공유 기능 수정
hankim0904 Sep 30, 2024
7757ce0
Fix: 마이페이지 버튼 주석처리
hankim0904 Sep 30, 2024
f2b9cc6
Feat: role 기능 및 첫 페이지 접근 시 토큰 검증 로직 추가
hankim0904 Sep 30, 2024
db9bdb1
Fix: 여행지 상세페이지에서 수정버튼은 모두가, 삭제 버튼은 관리자만 접근 가능하도록 수정
hankim0904 Sep 30, 2024
70b7003
Fix: 리다이렉트 된 signin 페이지에서 뒤로가기 가능하도록 변경
hankim0904 Sep 30, 2024
d5a6ec3
Fix: 토큰 관련 오류 해결
hankim0904 Oct 1, 2024
9097caa
Fix: 레이아웃 표시 회색 배경 삭제 및 loading fallback 제거
hankim0904 Oct 1, 2024
6cab619
Fix: 비로그인 상태일때 등록 페이지 접근 버그 수정
hankim0904 Oct 1, 2024
b09094e
Feat: "로딩 스피너 , 에러 페이지 생성"
lee-ji-hong Sep 30, 2024
3f0bf5c
Feat: "배너 이미지 사이즈 수정 및 이미지 수정"
lee-ji-hong Sep 30, 2024
d4bfe4d
Feat: "폰트 사이즈 깨짐 사이즈 수정"
lee-ji-hong Sep 30, 2024
2b33127
Feat: "검색 기능 구현"
lee-ji-hong Sep 30, 2024
b0c580b
Feat: "focus 위치 수정"
lee-ji-hong Oct 1, 2024
3220bb1
Feat: "검색창 스타일 수정"
lee-ji-hong Oct 1, 2024
2ebb2b0
Feat: "폰트 하이라이팅 기능 추가"
lee-ji-hong Oct 1, 2024
5f6a099
Feat: "찜순으로 조회 노출"
lee-ji-hong Oct 1, 2024
96b045f
Feat: "이미지 스켈레톤"
lee-ji-hong Oct 1, 2024
cfdae5f
Feat: "주석 삭제"
lee-ji-hong Oct 1, 2024
9597f39
Feat: "선택적 속성으로 변경"
lee-ji-hong Oct 1, 2024
be814d5
Feat: "코스 등록 등급별 접근 권한 막기"
lee-ji-hong Oct 1, 2024
db76195
Feat: "검색 창 삭제"
lee-ji-hong Oct 1, 2024
b2fe661
Feat: "여행자 등급 수정"
lee-ji-hong Oct 1, 2024
7ccf7f3
Fix: 좌표값 없는 경우 주소로 지도 위치 찾기 기능 추가
hankim0904 Oct 1, 2024
81b6cca
Fix: 코스 상세페이지에서 좌표 없는 위치 클릭 시 지도 표시
hankim0904 Oct 1, 2024
199480b
Fix: 배포 문제 테스트
hankim0904 Oct 1, 2024
7102330
Fix: 배포 버전에서 리코일 문제 해결
hankim0904 Oct 1, 2024
71fdab0
Fix: 로그인 페이지 oauth 부분 주석 처리
hankim0904 Oct 1, 2024
fc4f0d7
Fix: 지도 검색 안되는 부분 alert 띄우기
hankim0904 Oct 1, 2024
f217904
Fix: 코스 경로 설정 모달 UI 수정
hankim0904 Oct 1, 2024
4dafdc5
Fix: 슬라이드 버튼 반응형 수정
hankim0904 Oct 1, 2024
61242e0
Fix: 코스 경로 설정 모달 UI 반응형 수정
hankim0904 Oct 1, 2024
1e24984
Fix: 코스 경로 설정 모달 UI 반응형 수정
hankim0904 Oct 1, 2024
2f4b259
Fix: 코스 경로 설정 모달 이미지 영역 패딩 추가
hankim0904 Oct 1, 2024
4af6c54
Feat: "인피니트 스크롤 적용"
lee-ji-hong Oct 1, 2024
5a1fa9c
Feat: "인피니트 스크롤 호출 코드 모듈화"
lee-ji-hong Oct 1, 2024
f9926c1
Feat: "자잘한 이슈 수정"
lee-ji-hong Oct 1, 2024
8ec0d51
Feat: "정렬 데이터 연동 및 필요없는 데이터 삭제"
lee-ji-hong Oct 1, 2024
b147cbe
Feat:"여행지 찾기 / 코스 찾기 ui 수정"
lee-ji-hong Oct 1, 2024
05d0acc
Feat: "검색 기능 연동"
lee-ji-hong Oct 1, 2024
15fb0fa
Feat: "커서 포인터 추가"
lee-ji-hong Oct 1, 2024
0d0d3b1
Feat: "코스 등록 후 경로 수정"
lee-ji-hong Oct 1, 2024
80b24e3
Feat: "배너 경로 수정"
lee-ji-hong Oct 1, 2024
389157a
Feat: "검색페이지 모바일에서 탭 클릭 안되는 이슈 수정"
lee-ji-hong Oct 1, 2024
6a21e87
Feat: "initialValue 수정"
lee-ji-hong Oct 1, 2024
6819579
Fix: 지번 수조 alert 메세지 추가
hankim0904 Oct 2, 2024
99d7307
Feat: "코스 등록 후 경로 예외처리"
lee-ji-hong Oct 2, 2024
0923057
Feat: "카드 스켈레톤 수정"
lee-ji-hong Oct 2, 2024
2fab00e
Feat: "코스 수정 페이지 생성"
lee-ji-hong Oct 2, 2024
b1b06a4
Feat: "검색창 여행지 리스트 ? 없애기"
lee-ji-hong Oct 2, 2024
5bdf8ef
Feat: "메인페이지 추천 데이터 수정"
lee-ji-hong Oct 2, 2024
31574c4
Feat: "코스 등록 변경"
lee-ji-hong Oct 14, 2024
0aeb050
Feat: "메인페이지 data 수정"
lee-ji-hong Oct 14, 2024
14253bc
Feat: "코스 찾기 별점 기능"
lee-ji-hong Oct 14, 2024
fcf2b96
Feat: "메인페이지에서 선택한 태그 취소 안되는 이슈 수정"
lee-ji-hong Oct 15, 2024
ff53822
Feat: "카드 이미지 및 사이즈 수정"
lee-ji-hong Oct 15, 2024
701f726
Fix: "ReactQueryDevtools 주석 처리"
lee-ji-hong Oct 15, 2024
2454320
Feat: "탭 상태 뒤로가기하면 여행지로 고정되는 이슈 전역 상태관리로 수정"
lee-ji-hong Oct 15, 2024
ba3f287
Feat: "console 삭제"
lee-ji-hong Oct 15, 2024
54f3558
Feat: "서버 포트 변경"
lee-ji-hong Dec 15, 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
2 changes: 1 addition & 1 deletion src/api/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface ApiRequestResponse<T> {
errorMessage?: string | null;
}

export const BASE_URL = import.meta.env.VITE_APP_BASE_URL || "http://api.course-maker.net:8080";
export const BASE_URL = import.meta.env.VITE_APP_BASE_URL || "https://api.course-maker.net:9090";

// 기본 Axios 설정
export const api = axios.create({
Expand Down
2 changes: 1 addition & 1 deletion src/assets/images/main/2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/main/4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/components/commons/BadgeList/BadgeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ interface BadgeListProps {

const BadgeList: React.FC<BadgeListProps> = ({ title, tags, selectedBadges = [], setSelectedBadges, onToggle }) => {
const toggleBadge = (badge: tagResponseDto) => {
if (!setSelectedBadges) return;
if (!setSelectedBadges) {
return;
}

setSelectedBadges((prevSelected) => {
if (prevSelected.some((prev) => prev.id === badge.id)) {
return prevSelected.filter((item) => item !== badge);
return prevSelected.filter((item) => item.id !== badge.id);
} else {
return [...prevSelected, badge];
}
Expand Down
1 change: 1 addition & 0 deletions src/components/commons/Card/Card2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const Card2: React.FC<CardProps> = ({ item, name, loading, isCourseTab, children
name={name}
title={item.title}
travelerCount={item.travelerCount}
averageRating={item.averageRating}
views={formatNumberWithCommas(item.views)}
duration={item.duration}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/components/commons/ItemBox/ItemBox.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// color: $Black;
font-size: 1.8rem;
font-weight: 700;
text-align: left !important;
line-height: 12px;
}

.item-location {
Expand Down
17 changes: 16 additions & 1 deletion src/components/commons/ItemBox/ItemBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,25 @@ interface ItemBoxProps {
}

const ItemBox: React.FC<ItemBoxProps> = ({ location, title, tags, name, travelerCount, views, duration, color }) => {
const splitTitle = (title: string) => {
const parts = [];
for (let i = 0; i < title.length; i += 10) {
parts.push(title.slice(i, i + 10));
}
return parts;
};

const titleParts = typeof title === "string" ? splitTitle(title) : [];

return (
<div className={cx("item-box")}>
<div className={cx("title-group")}>
<p className={cx("item-title")}>{title}</p>
{titleParts.map((part, index) => (
<span key={index} className={cx("item-title")}>
{part}
</span>
))}
{/* <p className={cx("item-title")}>{title}</p> */}
{name === "코스 찾기" ? (
<p className={cx("item-location")}>조회수 {views} 회</p>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/commons/ItemBox/ItemBox2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const ItemBox: React.FC<ItemBoxProps> = ({
</div>
<div className={cx("score-item-course")}>
<Image imageInfo={color === "white" ? IMAGES.WhiteStarIcon : IMAGES.BlackStarIcon} />
<span className={cx("score-text")}>{travelerCount}점</span>
<span className={cx("score-text")}>{averageRating}점</span>
</div>
</div>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const TitleInputController = <ControlType extends FieldValues>({
<Controller
name={formFieldName}
control={control}
render={({ field }) => <TitleInput placeholder="여행지 이름을 입력하세요." disabled={disabled} {...field} />}
render={({ field }) => <TitleInput placeholder="코스 이름을 입력하세요." disabled={disabled} {...field} />}
/>
);
};
Expand Down
1 change: 0 additions & 1 deletion src/hooks/business/useBadgeListViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const useBadgeListViewModel = () => {

//태그 데이터 패칭 여부 확인
if (isTagLoading) {
console.log("Loading tags data...");
return { isTagLoading, tagData: null };
}

Expand Down
4 changes: 2 additions & 2 deletions src/pages/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
// import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { RecoilRoot } from "recoil";
import PageRouter from "./PageRouter";

Expand All @@ -16,7 +16,7 @@ function App() {
<>
<RecoilRoot>
<QueryClientProvider client={queryClient}>
<ReactQueryDevtools initialIsOpen={false} />
{/* <ReactQueryDevtools initialIsOpen={false} /> */}
<PageRouter />
</QueryClientProvider>
</RecoilRoot>
Expand Down
21 changes: 21 additions & 0 deletions src/pages/HomePage/HomePage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
position: relative;
}

.card-content-number {
position: absolute;
top: 16px;
color: white;
left: 16px;
font-size: 30px;
font-weight: 700;
}

.card-image {
height: 28rem;
width: 100%;
Expand All @@ -49,6 +58,18 @@
font-weight: bold;
}

.txt-title {
p {
font-size: 16px;
font-weight: 700;
text-align: left;

@media (max-width: 375px) {
font-size: 10px;
}
}
}

.card-title {
font-size: 16px;

Expand Down
59 changes: 33 additions & 26 deletions src/pages/HomePage/data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { IMAGES } from "@/constants/images";

export const LikeMockData = [
{ id: 0, url: "http://tong.visitkorea.or.kr/cms/resource/37/3029337_image2_1.jpg" },
{ id: 1, url: "http://tong.visitkorea.or.kr/cms/resource/90/2795790_image2_1.jpg" },
{ id: 2, url: "http://tong.visitkorea.or.kr/cms/resource/82/3345882_image2_1.jpg" },
{ id: 3, url: "http://tong.visitkorea.or.kr/cms/resource/71/2795871_image2_1.jpg" },
];

export const bannerData = [
{
id: 0,
Expand All @@ -21,25 +28,25 @@ export const bannerData = [

export const busanData = [
{
id: 3,
name: "마음이 평화로워지는 역사 탐방",
location: "박물관 여행",
image: IMAGES.One.src,
id: 36,
name: "잊지 못할 부산/n즐거움이 가득한",
location: "체험학습 추천 코스",
image: "http://tong.visitkorea.or.kr/cms/resource/37/2781837_image2_1.jpg",
icons: {
calendar: 2,
member: 2,
blackStar: 2,
calendar: 22,
member: 27,
blackStar: 12,
},
tags: [
{ id: 0, name: "자연", description: "바다" },
{ id: 1, name: "자연", description: "둘레길" },
{ id: 1, name: "날씨", description: "실내공간" },
],
},
{
id: 27,
name: "부산의 숨은 명소 한국의 산토리니",
location: "영도",
image: IMAGES.Two.src,
id: 37,
name: "부산의 숨은 명소/n쉬면서 즐기는",
location: "피크닉 투어",
image: "http://tong.visitkorea.or.kr/cms/resource/52/2961452_image2_1.jpeg",
icons: {
calendar: 102,
member: 21,
Expand All @@ -51,25 +58,25 @@ export const busanData = [
],
},
{
id: 13,
name: "마음의 양식을 채우는 시간",
location: "문화공간투어",
image: IMAGES.Three.src,
id: 23,
name: "마음이 평화로워지는/n역사 탐방",
location: "박물관 여행",
image: "https://myawsbucket0154.s3.ap-northeast-2.amazonaws.com/28a8d5d2-98a1-4b2d-adc3-a45d302f1259.jfif",
icons: {
calendar: 22,
member: 27,
blackStar: 12,
calendar: 2,
member: 2,
blackStar: 2,
},
tags: [
{ id: 0, name: "자연", description: "바다" },
{ id: 1, name: "날씨", description: "실내공간" },
{ id: 1, name: "자연", description: "둘레길" },
],
},
{
id: 2,
name: "가슴이 뻥뚫리는 바다 위를 건너가는",
location: "송도 케이블카",
image: IMAGES.Four.src,
id: 34,
name: "가슴이 뻥뚫리는/n바다 위를 건너가는",
location: "바다사진 촬영스팟",
image: " http://tong.visitkorea.or.kr/cms/resource/48/2832648_image2_1.jpg",
icons: {
calendar: 72,
member: 827,
Expand Down Expand Up @@ -138,7 +145,7 @@ export const bannerItemsData = {
subtitle: "해운대 그린레일웨이",
title: "바다를 따라 다니며\n육지와는 다른 풍경을 즐기세요",
size: "large",
url: "destination/1091",
url: "destination/1092",
},
{
id: 1,
Expand All @@ -150,7 +157,7 @@ export const bannerItemsData = {
subtitle: "부산 필수코스",
title: "부산이 처음이라면\n여기부터 가보셔야죠",
size: "large",
url: "course/18",
url: "course/38",
},
],
};
19 changes: 11 additions & 8 deletions src/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ItemBox from "@/components/commons/ItemBox/ItemBox";
import Banner from "@/components/commons/Banner/Banner";
import SearchBar from "@/components/commons/SearchBar";
import Image from "@/components/commons/Image";
import Text from "@/components/commons/Text";

import styles from "./HomePage.module.scss";
import classNames from "classnames/bind";
Expand All @@ -19,7 +20,7 @@ import { useGetCourseSearchQuery } from "@/hooks/course/queries/useGetCourseSear
import { useGetCourseQuery } from "@/hooks/course/queries/useGetCourseQuery";
import { DestinationBadgesState } from "@/recoil/serviceAtom";
import { tagResponseDto } from "@/api/tag/type";
import { bannerItemsData, busanData } from "./data.js";
import { bannerItemsData, busanData, LikeMockData } from "./data.js";
const Card = lazy(() => import("@/components/commons/Card/Card"));
const bannerItems = bannerItemsData;

Expand All @@ -36,7 +37,7 @@ const HomePage = () => {
const { courseSearchData } = useGetCourseSearchQuery(1, inputValue);
// const { courseData: coursePopularData } = useGetCourseQuery("record=4&page=1&orderBy=POPULAR");
const { courseData: courseLikeData } = useGetCourseQuery("record=4&page=2&orderBy=LIKE");
const [DestinationBadges, setDestinationBadgesState] = useRecoilState(DestinationBadgesState);
const [, setDestinationBadgesState] = useRecoilState(DestinationBadgesState);
const navigate = useNavigate();

const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -69,8 +70,8 @@ const HomePage = () => {
}, []);

const handleClick = (tag: tagResponseDto) => {
setDestinationBadgesState([...DestinationBadges, tag]);
navigate(`search`, { state: { propsTagName: tag.name } });
setDestinationBadgesState([tag]);
navigate(`search`);
};
return (
<div data-testid="home-page">
Expand Down Expand Up @@ -115,8 +116,9 @@ const HomePage = () => {
<div className={cx("card-image-container")}>
<img loading="lazy" alt={item.location} src={item.image} className={cx("card-image")} />
<div className={cx("card-content")}>
{/* <span className={cx("card-title")}>{item.name}</span>
<span className={cx("card-subtitle")}>{item.location}</span> */}
<Text className={cx("txt-title")} text={item.name} />
{/* <span className={cx("card-title")}>{item.name}</span> */}
<span className={cx("card-subtitle")}>{item.location}</span>
</div>
</div>
</Card>
Expand All @@ -128,10 +130,11 @@ const HomePage = () => {
<Section title="요즘 인기있는 코스">
<div className={cx("card_container")}>
<Suspense fallback={<LoadingSkeleton />}>
{courseLikeData?.contents.map((item) => (
{courseLikeData?.contents.map((item, index) => (
<Card key={item.id} name={"코스 찾기"} id={item.id}>
<div className={cx("card-image-container")}>
<img loading="lazy" alt={item.title} src={item.pictureLink} className={cx("card-image")} />
<img src={LikeMockData[index].url} className={cx("card-image")} />
<Text className={cx("card-content-number")} text={index + 1} />
<div className={cx("card-content")}>
<ItemBox
color="white"
Expand Down
12 changes: 6 additions & 6 deletions src/pages/SearchPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { useState } from "react";
// import { useLocation } from "react-router-dom";
import styles from "./SearchPage.module.scss";
import classNames from "classnames/bind";
import { useRecoilState } from "recoil";

import SearchBadgeLists from "@/components/commons/BadgeLists/SearchBadgeLists";
import TabNavigation from "@/components/commons/TabNavigation/TabNavigation";
Expand All @@ -12,17 +10,19 @@ import SearchBar from "@/components/commons/SearchBar";
import { useGetDestinationSearchQuery } from "@/hooks/destination/queries/useGetDestinationSearchQuery";
import { useGetCourseSearchQuery } from "@/hooks/course/queries/useGetCourseSearchQuery";
import { useBadgeListViewModel } from "@/hooks/business/useBadgeListViewModel";
import { activeTabState } from "@/recoil/serviceAtom";

import styles from "./SearchPage.module.scss";
import classNames from "classnames/bind";
const cx = classNames.bind(styles);

const SearchPage = () => {
const [activeTab, setActiveTab] = useState("여행지 찾기");
const [activeTab, setActiveTab] = useRecoilState(activeTabState);
const [inputValue, setInputValue] = useState("");
const { isTagLoading, DestinationBadges, CourseBadges } = useBadgeListViewModel();
const { DestinationBadges, CourseBadges } = useBadgeListViewModel();
const { destinationSearchData } = useGetDestinationSearchQuery(1, inputValue);
const { courseSearchData } = useGetCourseSearchQuery(1, inputValue);
const isCourseTab = activeTab === "코스 찾기";
console.log(isTagLoading);

const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/manageTokenInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const refreshAccessToken = async () => {
const refreshToken = getRefreshToken();
if (refreshToken) {
try {
const response = await axios.post("http://api.course-maker.net:8080/v1/auth/reissue", { refreshToken });
const response = await axios.post("https://api.course-maker.net:9090/v1/auth/reissue", { refreshToken });
return response.data.accessToken;
} catch (error) {
console.error("Failed to refresh access token", error);
Expand Down
Loading