@daeryun/dr_components 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset/images/myCase/icon/check_box.webp +0 -0
- package/dist/asset/images/myCase/icon/check_box_gray.webp +0 -0
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/banner/TopBanner.stories.jsx +8 -4
- package/dist/components/banner/TopBanner.stories.tsx +8 -4
- package/dist/components/page/MyCase/MyCasePage.d.ts +5 -0
- package/dist/components/page/MyCase/MyCasePage.jsx +21 -0
- package/dist/components/page/MyCase/MyCasePage.tsx +33 -0
- package/dist/components/page/MyCase/[id]/MyCaseDetailPage.d.ts +5 -0
- package/dist/components/page/MyCase/[id]/MyCaseDetailPage.jsx +78 -0
- package/dist/components/page/MyCase/[id]/MyCaseDetailPage.tsx +150 -0
- package/dist/components/page/MyCase/[id]/_component/ContactInfo.d.ts +2 -0
- package/dist/components/page/MyCase/[id]/_component/ContactInfo.jsx +89 -0
- package/dist/components/page/MyCase/[id]/_component/ContactInfo.tsx +115 -0
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.d.ts +6 -0
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.jsx +44 -0
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.tsx +93 -0
- package/dist/components/page/MyCase/[id]/_component/TimeLine.d.ts +6 -0
- package/dist/components/page/MyCase/[id]/_component/TimeLine.jsx +46 -0
- package/dist/components/page/MyCase/[id]/_component/TimeLine.tsx +73 -0
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.d.ts +11 -0
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +80 -0
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +187 -0
- package/dist/components/page/MyCase/[id]/_component/_document/Document.d.ts +6 -0
- package/dist/components/page/MyCase/[id]/_component/_document/Document.jsx +31 -0
- package/dist/components/page/MyCase/[id]/_component/_document/Document.tsx +53 -0
- package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.d.ts +6 -0
- package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.jsx +44 -0
- package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.tsx +61 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseInquiryAddModal.d.ts +7 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseInquiryAddModal.jsx +107 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseInquiryAddModal.tsx +150 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseInquiryConfirmModal.d.ts +7 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseInquiryConfirmModal.jsx +24 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseInquiryConfirmModal.tsx +57 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.d.ts +5 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.jsx +37 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.tsx +59 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/ModalCotainer.d.ts +7 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/ModalCotainer.jsx +26 -0
- package/dist/components/page/MyCase/[id]/_component/_modal/ModalCotainer.tsx +39 -0
- package/dist/components/page/MyCase/[id]/_component/_textarea/TextArea.d.ts +7 -0
- package/dist/components/page/MyCase/[id]/_component/_textarea/TextArea.jsx +4 -0
- package/dist/components/page/MyCase/[id]/_component/_textarea/TextArea.tsx +24 -0
- package/dist/components/page/MyCase/_actions/action.d.ts +35 -0
- package/dist/components/page/MyCase/_actions/action.js +143 -0
- package/dist/components/page/MyCase/_actions/action.ts +165 -0
- package/dist/components/page/MyCase/_component/CaseContainer.d.ts +4 -0
- package/dist/components/page/MyCase/_component/CaseContainer.jsx +195 -0
- package/dist/components/page/MyCase/_component/CaseContainer.tsx +245 -0
- package/dist/components/page/MyCase/_component/_breadCrumble/CategoryMenu.d.ts +8 -0
- package/dist/components/page/MyCase/_component/_breadCrumble/CategoryMenu.jsx +43 -0
- package/dist/components/page/MyCase/_component/_breadCrumble/CategoryMenu.tsx +73 -0
- package/dist/components/page/MyCase/_component/_button/Badge.d.ts +14 -0
- package/dist/components/page/MyCase/_component/_button/Badge.jsx +16 -0
- package/dist/components/page/MyCase/_component/_button/Badge.tsx +22 -0
- package/dist/components/page/MyCase/_component/_button/SubColor1Button.d.ts +7 -0
- package/dist/components/page/MyCase/_component/_button/SubColor1Button.jsx +9 -0
- package/dist/components/page/MyCase/_component/_button/SubColor1Button.tsx +33 -0
- package/dist/components/page/MyCase/_component/_button/SubMenuButton.d.ts +7 -0
- package/dist/components/page/MyCase/_component/_button/SubMenuButton.jsx +9 -0
- package/dist/components/page/MyCase/_component/_button/SubMenuButton.tsx +31 -0
- package/dist/components/page/MyCase/_component/_empty/EmptyTable.d.ts +6 -0
- package/dist/components/page/MyCase/_component/_empty/EmptyTable.jsx +75 -0
- package/dist/components/page/MyCase/_component/_empty/EmptyTable.tsx +86 -0
- package/dist/components/page/MyCase/_component/_layout/CaseLayout.d.ts +7 -0
- package/dist/components/page/MyCase/_component/_layout/CaseLayout.jsx +11 -0
- package/dist/components/page/MyCase/_component/_layout/CaseLayout.tsx +29 -0
- package/dist/components/page/MyCase/_component/_layout/CaseWrapper.d.ts +12 -0
- package/dist/components/page/MyCase/_component/_layout/CaseWrapper.jsx +25 -0
- package/dist/components/page/MyCase/_component/_layout/CaseWrapper.tsx +41 -0
- package/dist/components/page/MyCase/_component/_layout/HeaderLayout.d.ts +4 -0
- package/dist/components/page/MyCase/_component/_layout/HeaderLayout.jsx +4 -0
- package/dist/components/page/MyCase/_component/_layout/HeaderLayout.tsx +5 -0
- package/dist/components/page/MyCase/_component/_layout/IntroWrapper.d.ts +9 -0
- package/dist/components/page/MyCase/_component/_layout/IntroWrapper.jsx +30 -0
- package/dist/components/page/MyCase/_component/_layout/IntroWrapper.tsx +71 -0
- package/dist/components/page/MyCase/_component/_loading/Loading.d.ts +2 -0
- package/dist/components/page/MyCase/_component/_loading/Loading.jsx +89 -0
- package/dist/components/page/MyCase/_component/_loading/Loading.tsx +92 -0
- package/dist/components/page/MyCase/_component/_pagination/PaginationComponent.d.ts +10 -0
- package/dist/components/page/MyCase/_component/_pagination/PaginationComponent.jsx +80 -0
- package/dist/components/page/MyCase/_component/_pagination/PaginationComponent.tsx +133 -0
- package/dist/components/page/MyCase/_component/_table/CaseLine.d.ts +5 -0
- package/dist/components/page/MyCase/_component/_table/CaseLine.jsx +66 -0
- package/dist/components/page/MyCase/_component/_table/CaseLine.tsx +139 -0
- package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.d.ts +9 -0
- package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.jsx +65 -0
- package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.tsx +79 -0
- package/dist/components/page/MyCase/_component/_table/CaseTable.d.ts +9 -0
- package/dist/components/page/MyCase/_component/_table/CaseTable.jsx +62 -0
- package/dist/components/page/MyCase/_component/_table/CaseTable.tsx +93 -0
- package/dist/components/page/MyCase/_component/_table/CaseTableMo.d.ts +9 -0
- package/dist/components/page/MyCase/_component/_table/CaseTableMo.jsx +11 -0
- package/dist/components/page/MyCase/_component/_table/CaseTableMo.tsx +28 -0
- package/dist/components/page/MyCase/_component/_table/CaseTableMoBox.d.ts +5 -0
- package/dist/components/page/MyCase/_component/_table/CaseTableMoBox.jsx +39 -0
- package/dist/components/page/MyCase/_component/_table/CaseTableMoBox.tsx +55 -0
- package/dist/components/page/MyCase/_fetchers/addMyCaseQuestion.d.ts +6 -0
- package/dist/components/page/MyCase/_fetchers/addMyCaseQuestion.js +31 -0
- package/dist/components/page/MyCase/_fetchers/addMyCaseQuestion.ts +22 -0
- package/dist/components/page/MyCase/_fetchers/getCase.d.ts +5 -0
- package/dist/components/page/MyCase/_fetchers/getCase.js +30 -0
- package/dist/components/page/MyCase/_fetchers/getCase.ts +21 -0
- package/dist/components/page/MyCase/_fetchers/getCaseList.d.ts +6 -0
- package/dist/components/page/MyCase/_fetchers/getCaseList.js +30 -0
- package/dist/components/page/MyCase/_fetchers/getCaseList.ts +21 -0
- package/dist/components/page/MyCase/_fetchers/getCourtFileList.d.ts +5 -0
- package/dist/components/page/MyCase/_fetchers/getCourtFileList.js +30 -0
- package/dist/components/page/MyCase/_fetchers/getCourtFileList.ts +21 -0
- package/dist/components/page/MyCase/_fetchers/getMyCaseQuestion.d.ts +7 -0
- package/dist/components/page/MyCase/_fetchers/getMyCaseQuestion.js +30 -0
- package/dist/components/page/MyCase/_fetchers/getMyCaseQuestion.ts +24 -0
- package/dist/components/page/MyCase/_fetchers/getMyFileList.d.ts +5 -0
- package/dist/components/page/MyCase/_fetchers/getMyFileList.js +30 -0
- package/dist/components/page/MyCase/_fetchers/getMyFileList.ts +21 -0
- package/dist/components/page/MyCase/_fetchers/getTimeLine.d.ts +5 -0
- package/dist/components/page/MyCase/_fetchers/getTimeLine.js +30 -0
- package/dist/components/page/MyCase/_fetchers/getTimeLine.ts +21 -0
- package/dist/components/page/MyCase/_lib/catagoryMenuName.d.ts +8 -0
- package/dist/components/page/MyCase/_lib/catagoryMenuName.js +8 -0
- package/dist/components/page/MyCase/_lib/catagoryMenuName.ts +11 -0
- package/dist/components/page/MyCase/_lib/pagination/locale/ko_KR.d.ts +15 -0
- package/dist/components/page/MyCase/_lib/pagination/locale/ko_KR.js +21 -0
- package/dist/components/page/MyCase/_type/type.d.ts +73 -0
- package/dist/components/page/MyCase/_type/type.js +1 -0
- package/dist/components/page/MyCase/_type/type.ts +81 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.js +1 -1
- package/dist/components/page/index.ts +1 -1
- package/dist/styles/globals.css +2332 -235
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { useMutation, useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { FetchType, DetailList, TimeLineType, FileList, Question } from '../_type/type';
|
|
3
|
+
import getCase from '../_fetchers/getCase';
|
|
4
|
+
import getTimeLine from '../_fetchers/getTimeLine';
|
|
5
|
+
|
|
6
|
+
import getCourtFileList from '../_fetchers/getCourtFileList';
|
|
7
|
+
import getMyFileList from '../_fetchers/getMyFileList';
|
|
8
|
+
import getMyCaseQuestion from '../_fetchers/getMyCaseQuestion';
|
|
9
|
+
import addMyCaseQuestion from '../_fetchers/addMyCaseQuestion';
|
|
10
|
+
import getCaseList from '../_fetchers/getCaseList';
|
|
11
|
+
|
|
12
|
+
const jwt2 =
|
|
13
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTc0MDAxNDYzOCwiZXhwIjoxNzcxNTcyMjM4fQ.11ra7DkzlOVmBqDjo8SJTQnZDZdRHXjjU3ujK8G3OOY';
|
|
14
|
+
// 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjMsImVtYWlsIjoiNjAzMDgwNEBnbWFpbC5jb20iLCJwcm92aWRlciI6Imdvb2dsZSIsImlzTmV3IjpmYWxzZSwiaWF0IjoxNzQwNDQ2Nzg1LCJleHAiOjE3NDA0ODI3ODV9.v_d7htci4fjLA5MqBXWxUqyNjsAm2GEcdRBO5se-DB8'; //빈거
|
|
15
|
+
|
|
16
|
+
export const actionGetCaseList = ({
|
|
17
|
+
tapState,
|
|
18
|
+
|
|
19
|
+
pageNumber,
|
|
20
|
+
pageSize,
|
|
21
|
+
jwt
|
|
22
|
+
}: {
|
|
23
|
+
tapState: string;
|
|
24
|
+
|
|
25
|
+
pageNumber: number;
|
|
26
|
+
pageSize: number;
|
|
27
|
+
jwt?: string;
|
|
28
|
+
}) => {
|
|
29
|
+
const { data, isLoading } = useQuery({
|
|
30
|
+
queryKey: ['case', tapState, pageNumber, pageSize],
|
|
31
|
+
queryFn: () =>
|
|
32
|
+
getCaseList({
|
|
33
|
+
jwt: jwt2,
|
|
34
|
+
size: pageSize,
|
|
35
|
+
page: pageNumber
|
|
36
|
+
}),
|
|
37
|
+
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
38
|
+
refetchOnWindowFocus: false,
|
|
39
|
+
|
|
40
|
+
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
41
|
+
// cacheTime: 0,
|
|
42
|
+
gcTime: 0,
|
|
43
|
+
staleTime: 0
|
|
44
|
+
});
|
|
45
|
+
return { data, isLoading };
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const actionGetDetailList = (id: string, jwt?: string) => {
|
|
49
|
+
const { data, isLoading } = useQuery<FetchType<DetailList>>({
|
|
50
|
+
queryKey: ['case', id],
|
|
51
|
+
queryFn: () =>
|
|
52
|
+
getCase({
|
|
53
|
+
jwt: jwt ? jwt : jwt2,
|
|
54
|
+
id: id as string
|
|
55
|
+
}),
|
|
56
|
+
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
57
|
+
refetchOnWindowFocus: false,
|
|
58
|
+
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
59
|
+
gcTime: 0,
|
|
60
|
+
staleTime: 0,
|
|
61
|
+
enabled: !!id
|
|
62
|
+
// onSuccess: res => {},
|
|
63
|
+
// onError: error => {
|
|
64
|
+
// console.log(error);
|
|
65
|
+
// }
|
|
66
|
+
});
|
|
67
|
+
return { data, isLoading };
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const actionGetTimeLine = (id: string, jwt?: string) => {
|
|
71
|
+
const { data, isLoading } = useQuery<FetchType<TimeLineType>>({
|
|
72
|
+
queryKey: ['case', 'timeline', id],
|
|
73
|
+
queryFn: () =>
|
|
74
|
+
getTimeLine({
|
|
75
|
+
jwt: jwt ? jwt : jwt2,
|
|
76
|
+
id: id as string
|
|
77
|
+
}),
|
|
78
|
+
gcTime: 0,
|
|
79
|
+
staleTime: 0,
|
|
80
|
+
enabled: !!id
|
|
81
|
+
// onSuccess: res => {},
|
|
82
|
+
// onError: error => {
|
|
83
|
+
// console.log(error);
|
|
84
|
+
// }
|
|
85
|
+
});
|
|
86
|
+
return { data, isLoading };
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const actionGetCourtFileList = (id: string, jwt?: string) => {
|
|
90
|
+
const { data, isLoading } = useQuery<FetchType<FileList[]>>({
|
|
91
|
+
queryKey: ['case', 'courtFileList', id],
|
|
92
|
+
queryFn: () =>
|
|
93
|
+
getCourtFileList({
|
|
94
|
+
jwt: jwt ? jwt : jwt2,
|
|
95
|
+
id: id as string
|
|
96
|
+
}),
|
|
97
|
+
gcTime: 0,
|
|
98
|
+
staleTime: 0,
|
|
99
|
+
enabled: !!id
|
|
100
|
+
// onSuccess: res => {},
|
|
101
|
+
// onError: error => {
|
|
102
|
+
// console.log(error);
|
|
103
|
+
// }
|
|
104
|
+
});
|
|
105
|
+
return { data, isLoading };
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const actionGetMyFileList = (id: string, jwt?: string) => {
|
|
109
|
+
const { data, isLoading } = useQuery<FetchType<FileList[]>>({
|
|
110
|
+
queryKey: ['case', 'myFileList', id],
|
|
111
|
+
queryFn: () =>
|
|
112
|
+
getMyFileList({
|
|
113
|
+
jwt: jwt ? jwt : jwt2,
|
|
114
|
+
id: id as string
|
|
115
|
+
}),
|
|
116
|
+
gcTime: 0,
|
|
117
|
+
staleTime: 0,
|
|
118
|
+
enabled: !!id
|
|
119
|
+
// onSuccess: res => {},
|
|
120
|
+
// onError: error => {
|
|
121
|
+
// console.log(error);
|
|
122
|
+
// }
|
|
123
|
+
});
|
|
124
|
+
return { data, isLoading };
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const actionGetMyCaseQuestion = (id: string, page: number, pageSize: number, jwt?: string) => {
|
|
128
|
+
const { data, isLoading, refetch } = useQuery<FetchType<Question[]>>({
|
|
129
|
+
queryKey: ['case', 'myCaseQuestion', id, page, pageSize],
|
|
130
|
+
queryFn: () =>
|
|
131
|
+
getMyCaseQuestion({
|
|
132
|
+
jwt: jwt ? jwt : jwt2,
|
|
133
|
+
id: id as string,
|
|
134
|
+
page: page,
|
|
135
|
+
size: pageSize
|
|
136
|
+
}),
|
|
137
|
+
gcTime: 0,
|
|
138
|
+
staleTime: 0,
|
|
139
|
+
enabled: !!id
|
|
140
|
+
// onSuccess: res => {},
|
|
141
|
+
// onError: error => {
|
|
142
|
+
// console.log(error);
|
|
143
|
+
// }
|
|
144
|
+
});
|
|
145
|
+
return { data, isLoading, refetch };
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export const actionPostMyCaseQuestion = (id: string, content: string, jwt?: string) => {
|
|
149
|
+
const { mutateAsync, status } = useMutation<FetchType<Question[]>>({
|
|
150
|
+
mutationFn: async () =>
|
|
151
|
+
await addMyCaseQuestion({
|
|
152
|
+
jwt: jwt ? jwt : jwt2,
|
|
153
|
+
id: id as string,
|
|
154
|
+
content: content as string
|
|
155
|
+
}),
|
|
156
|
+
|
|
157
|
+
onSuccess: res => {},
|
|
158
|
+
onError: error => {
|
|
159
|
+
console.log(error);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const isLoading = status === 'pending';
|
|
164
|
+
return { mutateAsync, isLoading };
|
|
165
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import CaseLayout from './_layout/CaseLayout';
|
|
3
|
+
import EmptyTable from './_empty/EmptyTable';
|
|
4
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
5
|
+
import Loading from './_loading/Loading';
|
|
6
|
+
import { actionGetCaseList } from '../_actions/action';
|
|
7
|
+
import CaseTableMo from './_table/CaseTableMo';
|
|
8
|
+
const CaseTap = ({ title, type, tap, setTap }) => {
|
|
9
|
+
return (<button onClick={() => {
|
|
10
|
+
if (setTap) {
|
|
11
|
+
setTap(type);
|
|
12
|
+
}
|
|
13
|
+
}} className={`items-top sm-top:h-[40px] flex h-[29px] w-full justify-center border-b-[2px] border-solid transition-colors duration-300 lg:h-[45px] ${tap === type ? 'border-black text-black' : 'border-grayScale4 text-grayScale4'}`}>
|
|
14
|
+
<p className={'body_large1_mo sm-top:body_large1_tb lg:body_large1'}>{title}</p>
|
|
15
|
+
</button>);
|
|
16
|
+
};
|
|
17
|
+
const CaseContainer = ({ jwt }) => {
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const searchParams = useSearchParams();
|
|
20
|
+
const { page, tap, subTap } = Object.fromEntries(searchParams.entries());
|
|
21
|
+
const tapState = tap ? tap : 'ongoing';
|
|
22
|
+
// const subTapState = subTap ? (subTap as string) : tap ? (tap as string) : 'ongoing';
|
|
23
|
+
const [pageSize, setPageSize] = useState(4);
|
|
24
|
+
const [caseList, setCaseList] = useState([]);
|
|
25
|
+
const [totalLength, setTotalLength] = useState(0);
|
|
26
|
+
// const [isLoading, setIsLoading] = useState(true);
|
|
27
|
+
const pageNumber = page ? Number(page) : 1;
|
|
28
|
+
const handleOnChange = (pageNum) => {
|
|
29
|
+
router.push(`/mycase?page=${pageNum}&tap=${tap}&subTap=${subTap}`);
|
|
30
|
+
};
|
|
31
|
+
const handleOnTap = (tap) => {
|
|
32
|
+
router.push(`/mycase?page=${page}&tap=${tap}&subTap=${tap === 'ongoing' ? 'ongoing' : 'closed'}`);
|
|
33
|
+
};
|
|
34
|
+
// const handleOnSubTap = (subTap: string) => {
|
|
35
|
+
// router.push(`/mycase?page=1&tap=${tapState}&subTap=${subTap}`);
|
|
36
|
+
// };
|
|
37
|
+
const { data, isLoading } = actionGetCaseList({
|
|
38
|
+
tapState,
|
|
39
|
+
pageNumber,
|
|
40
|
+
pageSize,
|
|
41
|
+
jwt
|
|
42
|
+
});
|
|
43
|
+
// useEffect(() => {
|
|
44
|
+
// const handleResize = () => {
|
|
45
|
+
// setPageSize(window.innerWidth < 721 ? 3 : 6);
|
|
46
|
+
// }; // 300ms 딜레이
|
|
47
|
+
// window.addEventListener('resize', handleResize);
|
|
48
|
+
// return () => window.removeEventListener('resize', handleResize);
|
|
49
|
+
// }, []);
|
|
50
|
+
return (<CaseLayout outerClassName="mt-[230px] sm-top:mt-[310px] lg:mt-[294px] " innerClassName={'py-[40px] sm-top:py-[52px] lg:py-[60px]'} isMobilePadding={false}>
|
|
51
|
+
<div className={''}>
|
|
52
|
+
<div className="sm-top:px-[50px] flex flex-row items-center px-[20px] 2sm:px-[40px] lg:px-[60px]">
|
|
53
|
+
<CaseTap title="진행중인 사건" type="ongoing" tap={tapState} setTap={handleOnTap}/>
|
|
54
|
+
<CaseTap title="종결된 사건" type="closed" tap={tapState} setTap={handleOnTap}/>
|
|
55
|
+
</div>
|
|
56
|
+
{/* <div className={'py-[22px] sm-top:px-[50px] sm-top:py-[16px] lg:my-[20px] lg:px-[60px]'}>
|
|
57
|
+
{tapState === 'ongoing' ? (
|
|
58
|
+
<>
|
|
59
|
+
<div className="flex flex-row max-sm-top:hidden sm-top:gap-[12px] md2:gap-[20px] lg:gap-[28px] ">
|
|
60
|
+
<SubColor1Button
|
|
61
|
+
title="전체"
|
|
62
|
+
onClick={() => handleOnSubTap('ongoing')}
|
|
63
|
+
isSelected={subTapState === 'ongoing'}
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
<SubColor1Button
|
|
67
|
+
title="사건접수"
|
|
68
|
+
onClick={() => handleOnSubTap('사건접수')}
|
|
69
|
+
isSelected={subTapState === '사건접수'}
|
|
70
|
+
/>
|
|
71
|
+
<SubColor1Button
|
|
72
|
+
title="사건검토"
|
|
73
|
+
onClick={() => handleOnSubTap('사건검토')}
|
|
74
|
+
isSelected={subTapState === '사건검토'}
|
|
75
|
+
/>
|
|
76
|
+
<SubColor1Button
|
|
77
|
+
title="변호사상담"
|
|
78
|
+
onClick={() => handleOnSubTap('변호사상담')}
|
|
79
|
+
isSelected={subTapState === '변호사상담'}
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<SubColor1Button
|
|
83
|
+
title="소송준비"
|
|
84
|
+
onClick={() => handleOnSubTap('소송준비')}
|
|
85
|
+
isSelected={subTapState === '소송준비'}
|
|
86
|
+
/>
|
|
87
|
+
<SubColor1Button
|
|
88
|
+
title="소송진행"
|
|
89
|
+
onClick={() => handleOnSubTap('소송진행')}
|
|
90
|
+
isSelected={subTapState === '소송진행'}
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
<div className="sm-top:hidden">
|
|
94
|
+
<CaseTabSwiper
|
|
95
|
+
id="case-tab-swiper"
|
|
96
|
+
scrollClassName="max-[585px]:!block"
|
|
97
|
+
// handleOnSubTap={handleOnSubTap}
|
|
98
|
+
// subTapState={subTapState}
|
|
99
|
+
>
|
|
100
|
+
<SubColor1Button
|
|
101
|
+
title="전체"
|
|
102
|
+
onClick={() => handleOnSubTap('ongoing')}
|
|
103
|
+
isSelected={subTapState === 'ongoing'}
|
|
104
|
+
outerClassName="ml-[20px] 2sm:ml-[40px]"
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
<SubColor1Button
|
|
108
|
+
title="사건접수"
|
|
109
|
+
onClick={() => handleOnSubTap('사건접수')}
|
|
110
|
+
isSelected={subTapState === '사건접수'}
|
|
111
|
+
/>
|
|
112
|
+
<SubColor1Button
|
|
113
|
+
title="사건검토"
|
|
114
|
+
onClick={() => handleOnSubTap('사건검토')}
|
|
115
|
+
isSelected={subTapState === '사건검토'}
|
|
116
|
+
/>
|
|
117
|
+
<SubColor1Button
|
|
118
|
+
title="변호사상담"
|
|
119
|
+
onClick={() => handleOnSubTap('변호사상담')}
|
|
120
|
+
isSelected={subTapState === '변호사상담'}
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<SubColor1Button
|
|
124
|
+
title="소송준비"
|
|
125
|
+
onClick={() => handleOnSubTap('소송준비')}
|
|
126
|
+
isSelected={subTapState === '소송준비'}
|
|
127
|
+
/>
|
|
128
|
+
<SubColor1Button
|
|
129
|
+
title="소송진행"
|
|
130
|
+
onClick={() => handleOnSubTap('소송진행')}
|
|
131
|
+
isSelected={subTapState === '소송진행'}
|
|
132
|
+
/>
|
|
133
|
+
</CaseTabSwiper>
|
|
134
|
+
</div>
|
|
135
|
+
</>
|
|
136
|
+
) : (
|
|
137
|
+
<>
|
|
138
|
+
<div className="flex flex-row max-sm-top:hidden sm-top:gap-[12px] md2:gap-[20px] lg:gap-[28px] ">
|
|
139
|
+
<SubColor1Button
|
|
140
|
+
title="전체"
|
|
141
|
+
onClick={() => handleOnSubTap('closed')}
|
|
142
|
+
isSelected={subTapState === 'closed'}
|
|
143
|
+
/>
|
|
144
|
+
<SubColor1Button
|
|
145
|
+
title="사건종결"
|
|
146
|
+
onClick={() => handleOnSubTap('사건종결')}
|
|
147
|
+
isSelected={subTapState === '사건종결'}
|
|
148
|
+
/>
|
|
149
|
+
<SubColor1Button
|
|
150
|
+
title="환불"
|
|
151
|
+
onClick={() => handleOnSubTap('환불')}
|
|
152
|
+
isSelected={subTapState === '환불'}
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
<div className="sm-top:hidden">
|
|
156
|
+
<CaseTabSwiper
|
|
157
|
+
id="case-tab-swiper"
|
|
158
|
+
// handleOnSubTap={handleOnSubTap}
|
|
159
|
+
// subTapState={subTapState}
|
|
160
|
+
>
|
|
161
|
+
<SubColor1Button
|
|
162
|
+
title="전체"
|
|
163
|
+
onClick={() => handleOnSubTap('closed')}
|
|
164
|
+
isSelected={subTapState === 'closed'}
|
|
165
|
+
outerClassName="ml-[20px] 2sm:ml-[40px]"
|
|
166
|
+
/>
|
|
167
|
+
<SubColor1Button
|
|
168
|
+
title="사건종결"
|
|
169
|
+
onClick={() => handleOnSubTap('사건종결')}
|
|
170
|
+
isSelected={subTapState === '사건종결'}
|
|
171
|
+
/>
|
|
172
|
+
<SubColor1Button
|
|
173
|
+
title="환불"
|
|
174
|
+
onClick={() => handleOnSubTap('환불')}
|
|
175
|
+
isSelected={subTapState === '환불'}
|
|
176
|
+
/>
|
|
177
|
+
</CaseTabSwiper>
|
|
178
|
+
</div>
|
|
179
|
+
</>
|
|
180
|
+
)}
|
|
181
|
+
</div> */}
|
|
182
|
+
{isLoading ? (<Loading />) : (data === null || data === void 0 ? void 0 : data.list.length) > 0 ? (<>
|
|
183
|
+
{/* <CaseTable
|
|
184
|
+
list={data?.list}
|
|
185
|
+
totalLength={data?.totalLength}
|
|
186
|
+
pageSize={pageSize}
|
|
187
|
+
pageNumber={pageNumber}
|
|
188
|
+
onChange={handleOnChange}
|
|
189
|
+
/> */}
|
|
190
|
+
<CaseTableMo list={data === null || data === void 0 ? void 0 : data.list} totalLength={data === null || data === void 0 ? void 0 : data.totalLength} pageSize={pageSize} pageNumber={pageNumber} onChange={handleOnChange}/>
|
|
191
|
+
</>) : (<EmptyTable tap={tapState} subTap={0}/>)}
|
|
192
|
+
</div>
|
|
193
|
+
</CaseLayout>);
|
|
194
|
+
};
|
|
195
|
+
export default CaseContainer;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import CaseLayout from './_layout/CaseLayout';
|
|
3
|
+
import SubColor1Button from './_button/SubColor1Button';
|
|
4
|
+
import { useQuery } from 'react-query';
|
|
5
|
+
import getCaseList from '../_fetchers/getCaseList';
|
|
6
|
+
import CaseTable from './_table/CaseTable';
|
|
7
|
+
import { Case } from '../_type/type';
|
|
8
|
+
import EmptyTable from './_empty/EmptyTable';
|
|
9
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
10
|
+
import Loading from './_loading/Loading';
|
|
11
|
+
import { actionGetCaseList } from '../_actions/action';
|
|
12
|
+
import CaseTabSwiper from './_table/CaseTabSwiper';
|
|
13
|
+
import CaseTableMo from './_table/CaseTableMo';
|
|
14
|
+
|
|
15
|
+
const CaseTap = ({
|
|
16
|
+
title,
|
|
17
|
+
type,
|
|
18
|
+
tap,
|
|
19
|
+
setTap
|
|
20
|
+
}: {
|
|
21
|
+
title: string;
|
|
22
|
+
type: string;
|
|
23
|
+
tap: string;
|
|
24
|
+
setTap: (tap: string) => void;
|
|
25
|
+
}) => {
|
|
26
|
+
return (
|
|
27
|
+
<button
|
|
28
|
+
onClick={() => {
|
|
29
|
+
if (setTap) {
|
|
30
|
+
setTap(type);
|
|
31
|
+
}
|
|
32
|
+
}}
|
|
33
|
+
className={`items-top sm-top:h-[40px] flex h-[29px] w-full justify-center border-b-[2px] border-solid transition-colors duration-300 lg:h-[45px] ${
|
|
34
|
+
tap === type ? 'border-black text-black' : 'border-grayScale4 text-grayScale4'
|
|
35
|
+
}`}
|
|
36
|
+
>
|
|
37
|
+
<p className={'body_large1_mo sm-top:body_large1_tb lg:body_large1'}>{title}</p>
|
|
38
|
+
</button>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const CaseContainer = ({ jwt }: { jwt?: string }) => {
|
|
43
|
+
const router = useRouter();
|
|
44
|
+
const searchParams = useSearchParams();
|
|
45
|
+
const { page, tap, subTap } = Object.fromEntries(searchParams.entries());
|
|
46
|
+
const tapState = tap ? (tap as string) : 'ongoing';
|
|
47
|
+
// const subTapState = subTap ? (subTap as string) : tap ? (tap as string) : 'ongoing';
|
|
48
|
+
const [pageSize, setPageSize] = useState(4);
|
|
49
|
+
|
|
50
|
+
const [caseList, setCaseList] = useState<Case[]>([]);
|
|
51
|
+
const [totalLength, setTotalLength] = useState(0);
|
|
52
|
+
// const [isLoading, setIsLoading] = useState(true);
|
|
53
|
+
const pageNumber = page ? Number(page) : 1;
|
|
54
|
+
|
|
55
|
+
const handleOnChange = (pageNum: number) => {
|
|
56
|
+
router.push(`/mycase?page=${pageNum}&tap=${tap}&subTap=${subTap}`);
|
|
57
|
+
};
|
|
58
|
+
const handleOnTap = (tap: string) => {
|
|
59
|
+
router.push(`/mycase?page=${page}&tap=${tap}&subTap=${tap === 'ongoing' ? 'ongoing' : 'closed'}`);
|
|
60
|
+
};
|
|
61
|
+
// const handleOnSubTap = (subTap: string) => {
|
|
62
|
+
// router.push(`/mycase?page=1&tap=${tapState}&subTap=${subTap}`);
|
|
63
|
+
// };
|
|
64
|
+
|
|
65
|
+
const { data, isLoading } = actionGetCaseList({
|
|
66
|
+
tapState,
|
|
67
|
+
|
|
68
|
+
pageNumber,
|
|
69
|
+
pageSize,
|
|
70
|
+
jwt
|
|
71
|
+
});
|
|
72
|
+
// useEffect(() => {
|
|
73
|
+
// const handleResize = () => {
|
|
74
|
+
// setPageSize(window.innerWidth < 721 ? 3 : 6);
|
|
75
|
+
// }; // 300ms 딜레이
|
|
76
|
+
|
|
77
|
+
// window.addEventListener('resize', handleResize);
|
|
78
|
+
// return () => window.removeEventListener('resize', handleResize);
|
|
79
|
+
// }, []);
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<CaseLayout
|
|
83
|
+
outerClassName="mt-[230px] sm-top:mt-[310px] lg:mt-[294px] "
|
|
84
|
+
innerClassName={'py-[40px] sm-top:py-[52px] lg:py-[60px]'}
|
|
85
|
+
isMobilePadding={false}
|
|
86
|
+
>
|
|
87
|
+
<div className={''}>
|
|
88
|
+
<div className="sm-top:px-[50px] flex flex-row items-center px-[20px] 2sm:px-[40px] lg:px-[60px]">
|
|
89
|
+
<CaseTap title="진행중인 사건" type="ongoing" tap={tapState} setTap={handleOnTap} />
|
|
90
|
+
<CaseTap title="종결된 사건" type="closed" tap={tapState} setTap={handleOnTap} />
|
|
91
|
+
</div>
|
|
92
|
+
{/* <div className={'py-[22px] sm-top:px-[50px] sm-top:py-[16px] lg:my-[20px] lg:px-[60px]'}>
|
|
93
|
+
{tapState === 'ongoing' ? (
|
|
94
|
+
<>
|
|
95
|
+
<div className="flex flex-row max-sm-top:hidden sm-top:gap-[12px] md2:gap-[20px] lg:gap-[28px] ">
|
|
96
|
+
<SubColor1Button
|
|
97
|
+
title="전체"
|
|
98
|
+
onClick={() => handleOnSubTap('ongoing')}
|
|
99
|
+
isSelected={subTapState === 'ongoing'}
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<SubColor1Button
|
|
103
|
+
title="사건접수"
|
|
104
|
+
onClick={() => handleOnSubTap('사건접수')}
|
|
105
|
+
isSelected={subTapState === '사건접수'}
|
|
106
|
+
/>
|
|
107
|
+
<SubColor1Button
|
|
108
|
+
title="사건검토"
|
|
109
|
+
onClick={() => handleOnSubTap('사건검토')}
|
|
110
|
+
isSelected={subTapState === '사건검토'}
|
|
111
|
+
/>
|
|
112
|
+
<SubColor1Button
|
|
113
|
+
title="변호사상담"
|
|
114
|
+
onClick={() => handleOnSubTap('변호사상담')}
|
|
115
|
+
isSelected={subTapState === '변호사상담'}
|
|
116
|
+
/>
|
|
117
|
+
|
|
118
|
+
<SubColor1Button
|
|
119
|
+
title="소송준비"
|
|
120
|
+
onClick={() => handleOnSubTap('소송준비')}
|
|
121
|
+
isSelected={subTapState === '소송준비'}
|
|
122
|
+
/>
|
|
123
|
+
<SubColor1Button
|
|
124
|
+
title="소송진행"
|
|
125
|
+
onClick={() => handleOnSubTap('소송진행')}
|
|
126
|
+
isSelected={subTapState === '소송진행'}
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
<div className="sm-top:hidden">
|
|
130
|
+
<CaseTabSwiper
|
|
131
|
+
id="case-tab-swiper"
|
|
132
|
+
scrollClassName="max-[585px]:!block"
|
|
133
|
+
// handleOnSubTap={handleOnSubTap}
|
|
134
|
+
// subTapState={subTapState}
|
|
135
|
+
>
|
|
136
|
+
<SubColor1Button
|
|
137
|
+
title="전체"
|
|
138
|
+
onClick={() => handleOnSubTap('ongoing')}
|
|
139
|
+
isSelected={subTapState === 'ongoing'}
|
|
140
|
+
outerClassName="ml-[20px] 2sm:ml-[40px]"
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
<SubColor1Button
|
|
144
|
+
title="사건접수"
|
|
145
|
+
onClick={() => handleOnSubTap('사건접수')}
|
|
146
|
+
isSelected={subTapState === '사건접수'}
|
|
147
|
+
/>
|
|
148
|
+
<SubColor1Button
|
|
149
|
+
title="사건검토"
|
|
150
|
+
onClick={() => handleOnSubTap('사건검토')}
|
|
151
|
+
isSelected={subTapState === '사건검토'}
|
|
152
|
+
/>
|
|
153
|
+
<SubColor1Button
|
|
154
|
+
title="변호사상담"
|
|
155
|
+
onClick={() => handleOnSubTap('변호사상담')}
|
|
156
|
+
isSelected={subTapState === '변호사상담'}
|
|
157
|
+
/>
|
|
158
|
+
|
|
159
|
+
<SubColor1Button
|
|
160
|
+
title="소송준비"
|
|
161
|
+
onClick={() => handleOnSubTap('소송준비')}
|
|
162
|
+
isSelected={subTapState === '소송준비'}
|
|
163
|
+
/>
|
|
164
|
+
<SubColor1Button
|
|
165
|
+
title="소송진행"
|
|
166
|
+
onClick={() => handleOnSubTap('소송진행')}
|
|
167
|
+
isSelected={subTapState === '소송진행'}
|
|
168
|
+
/>
|
|
169
|
+
</CaseTabSwiper>
|
|
170
|
+
</div>
|
|
171
|
+
</>
|
|
172
|
+
) : (
|
|
173
|
+
<>
|
|
174
|
+
<div className="flex flex-row max-sm-top:hidden sm-top:gap-[12px] md2:gap-[20px] lg:gap-[28px] ">
|
|
175
|
+
<SubColor1Button
|
|
176
|
+
title="전체"
|
|
177
|
+
onClick={() => handleOnSubTap('closed')}
|
|
178
|
+
isSelected={subTapState === 'closed'}
|
|
179
|
+
/>
|
|
180
|
+
<SubColor1Button
|
|
181
|
+
title="사건종결"
|
|
182
|
+
onClick={() => handleOnSubTap('사건종결')}
|
|
183
|
+
isSelected={subTapState === '사건종결'}
|
|
184
|
+
/>
|
|
185
|
+
<SubColor1Button
|
|
186
|
+
title="환불"
|
|
187
|
+
onClick={() => handleOnSubTap('환불')}
|
|
188
|
+
isSelected={subTapState === '환불'}
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
<div className="sm-top:hidden">
|
|
192
|
+
<CaseTabSwiper
|
|
193
|
+
id="case-tab-swiper"
|
|
194
|
+
// handleOnSubTap={handleOnSubTap}
|
|
195
|
+
// subTapState={subTapState}
|
|
196
|
+
>
|
|
197
|
+
<SubColor1Button
|
|
198
|
+
title="전체"
|
|
199
|
+
onClick={() => handleOnSubTap('closed')}
|
|
200
|
+
isSelected={subTapState === 'closed'}
|
|
201
|
+
outerClassName="ml-[20px] 2sm:ml-[40px]"
|
|
202
|
+
/>
|
|
203
|
+
<SubColor1Button
|
|
204
|
+
title="사건종결"
|
|
205
|
+
onClick={() => handleOnSubTap('사건종결')}
|
|
206
|
+
isSelected={subTapState === '사건종결'}
|
|
207
|
+
/>
|
|
208
|
+
<SubColor1Button
|
|
209
|
+
title="환불"
|
|
210
|
+
onClick={() => handleOnSubTap('환불')}
|
|
211
|
+
isSelected={subTapState === '환불'}
|
|
212
|
+
/>
|
|
213
|
+
</CaseTabSwiper>
|
|
214
|
+
</div>
|
|
215
|
+
</>
|
|
216
|
+
)}
|
|
217
|
+
</div> */}
|
|
218
|
+
{isLoading ? (
|
|
219
|
+
<Loading />
|
|
220
|
+
) : data?.list.length > 0 ? (
|
|
221
|
+
<>
|
|
222
|
+
{/* <CaseTable
|
|
223
|
+
list={data?.list}
|
|
224
|
+
totalLength={data?.totalLength}
|
|
225
|
+
pageSize={pageSize}
|
|
226
|
+
pageNumber={pageNumber}
|
|
227
|
+
onChange={handleOnChange}
|
|
228
|
+
/> */}
|
|
229
|
+
<CaseTableMo
|
|
230
|
+
list={data?.list}
|
|
231
|
+
totalLength={data?.totalLength}
|
|
232
|
+
pageSize={pageSize}
|
|
233
|
+
pageNumber={pageNumber}
|
|
234
|
+
onChange={handleOnChange}
|
|
235
|
+
/>
|
|
236
|
+
</>
|
|
237
|
+
) : (
|
|
238
|
+
<EmptyTable tap={tapState} subTap={0} />
|
|
239
|
+
)}
|
|
240
|
+
</div>
|
|
241
|
+
</CaseLayout>
|
|
242
|
+
);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export default CaseContainer;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { catagoryMenuName } from '../../_lib/catagoryMenuName';
|
|
3
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import Link from 'next/link';
|
|
6
|
+
const CategoryMenu = (props) => {
|
|
7
|
+
const { t, isMargin = true, isWhite = false } = props;
|
|
8
|
+
const router = useRouter();
|
|
9
|
+
const pathname = usePathname();
|
|
10
|
+
const [menu, setMenu] = useState({ title: '', subTitle: '', address: '' });
|
|
11
|
+
//페이지 내부에서 쿼리 파라미터 없이 루트 경로로 돌아갈 때 새로고침
|
|
12
|
+
const reloadUrl = (url) => {
|
|
13
|
+
if (pathname === url) {
|
|
14
|
+
router.push(url);
|
|
15
|
+
router.refresh();
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setMenu(catagoryMenuName({ url: pathname, t }));
|
|
20
|
+
}, [pathname, t]);
|
|
21
|
+
const imagePath = isWhite ? '/images/mycase/home.svg' : '/images/mycase/home.webp';
|
|
22
|
+
const arrowImage = isWhite ? '/images/mycase/nav_arr.webp' : '/images/mycase/arrow_2.webp';
|
|
23
|
+
const textColor = isWhite ? 'text-[#fff]' : 'text-[#333333]';
|
|
24
|
+
return (<div className={(isMargin ? 'mb-[70px] mr-0 mt-8 lg:mb-[45px] lg:mt-[47px] ' : '') +
|
|
25
|
+
'relative z-10 flex flex-row font-normal leading-[1] tracking-[-0.32px] ' +
|
|
26
|
+
'text-[13px] xs:text-[14px] sm:text-[15px] lg:text-[16px] ' +
|
|
27
|
+
'min-w-[320px] items-center justify-end gap-[10px] lg:w-[100%]'}>
|
|
28
|
+
<Link href="/">
|
|
29
|
+
<Image src={imagePath} alt={'집'} width={15} height={15} className={'mb-[1px] h-auto sm:w-[17px] lg:w-[18px]'}/>
|
|
30
|
+
</Link>
|
|
31
|
+
<Image src={arrowImage} alt={'화살표_1'} width={8} height={13} className={'h-[13px] w-[8px]'}/>
|
|
32
|
+
{menu.title === menu.subTitle ? (<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
33
|
+
<div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.title}</div>
|
|
34
|
+
</Link>) : (<>
|
|
35
|
+
<div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.title}</div>
|
|
36
|
+
<Image src={arrowImage} alt={'화살표_2'} width={8} height={13} className={'h-[13px] w-[8px]'}/>
|
|
37
|
+
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
38
|
+
<div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.subTitle}</div>
|
|
39
|
+
</Link>
|
|
40
|
+
</>)}
|
|
41
|
+
</div>);
|
|
42
|
+
};
|
|
43
|
+
export default CategoryMenu;
|