@daeryun/dr_components 0.2.65 → 0.2.67
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/BrochureBtn/BrochureBtn.d.ts +0 -1
- package/dist/components/BrochureBtn/BrochureBtn.stories.d.ts +5 -6
- package/dist/components/BrochureBtn/MedicalBrochureBtn.d.ts +0 -1
- package/dist/components/Fix/Fix.stories.d.ts +2 -3
- package/dist/components/Footer/TopBtn.d.ts +0 -1
- package/dist/components/MapSection/Map.d.ts +0 -1
- package/dist/components/MapSection/MapSection.d.ts +1 -1
- package/dist/components/Mark/Mark.d.ts +0 -1
- package/dist/components/SelectBox/SelectBox.d.ts +8 -8
- package/dist/components/Seo/SeoStrength.stories.d.ts +0 -1
- package/dist/components/ViewMoreSection/SearchIcon.d.ts +0 -1
- package/dist/components/banner/TopBanner.d.ts +0 -1
- package/dist/components/banner/TopBanner.stories.d.ts +0 -1
- package/dist/components/categoryView/CategoryComponent.d.ts +1 -1
- package/dist/components/hook/useElementObserve.d.ts +2 -2
- package/dist/components/page/Choice/Choice.d.ts +1 -1
- package/dist/components/page/Strength/Strength.d.ts +0 -1
- package/dist/components/page/index.d.ts +0 -3
- package/dist/components/page/index.js +0 -3
- package/dist/components/page/index.ts +0 -3
- package/dist/lib/utils.js +4 -4
- package/dist/styles/globals.css +2 -548
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/dist/components/page/myCaseManage/[id]/_component/ContactInfo.d.ts +0 -3
- package/dist/components/page/myCaseManage/[id]/_component/ContactInfo.jsx +0 -65
- package/dist/components/page/myCaseManage/[id]/_component/ContactInfo.tsx +0 -76
- package/dist/components/page/myCaseManage/[id]/_component/DetailInfo.d.ts +0 -7
- package/dist/components/page/myCaseManage/[id]/_component/DetailInfo.jsx +0 -33
- package/dist/components/page/myCaseManage/[id]/_component/DetailInfo.tsx +0 -50
- package/dist/components/page/myCaseManage/[id]/_component/TimeLine.d.ts +0 -7
- package/dist/components/page/myCaseManage/[id]/_component/TimeLine.jsx +0 -41
- package/dist/components/page/myCaseManage/[id]/_component/TimeLine.tsx +0 -55
- package/dist/components/page/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.d.ts +0 -3
- package/dist/components/page/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.jsx +0 -90
- package/dist/components/page/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.tsx +0 -143
- package/dist/components/page/myCaseManage/[id]/_component/_document/Document.d.ts +0 -6
- package/dist/components/page/myCaseManage/[id]/_component/_document/Document.jsx +0 -41
- package/dist/components/page/myCaseManage/[id]/_component/_document/Document.tsx +0 -59
- package/dist/components/page/myCaseManage/[id]/_component/_document/DocumentLine.d.ts +0 -7
- package/dist/components/page/myCaseManage/[id]/_component/_document/DocumentLine.jsx +0 -55
- package/dist/components/page/myCaseManage/[id]/_component/_document/DocumentLine.tsx +0 -72
- package/dist/components/page/myCaseManage/[id]/index.d.ts +0 -3
- package/dist/components/page/myCaseManage/[id]/index.jsx +0 -44
- package/dist/components/page/myCaseManage/[id]/index.tsx +0 -85
- package/dist/components/page/myCaseManage/_actions/action.d.ts +0 -13
- package/dist/components/page/myCaseManage/_actions/action.js +0 -56
- package/dist/components/page/myCaseManage/_actions/action.ts +0 -65
- package/dist/components/page/myCaseManage/_component/CaseContainer.d.ts +0 -5
- package/dist/components/page/myCaseManage/_component/CaseContainer.jsx +0 -99
- package/dist/components/page/myCaseManage/_component/CaseContainer.tsx +0 -179
- package/dist/components/page/myCaseManage/_component/_breadCrumble/CategoryMenu.d.ts +0 -8
- package/dist/components/page/myCaseManage/_component/_breadCrumble/CategoryMenu.jsx +0 -47
- package/dist/components/page/myCaseManage/_component/_breadCrumble/CategoryMenu.tsx +0 -76
- package/dist/components/page/myCaseManage/_component/_button/Badge.d.ts +0 -15
- package/dist/components/page/myCaseManage/_component/_button/Badge.jsx +0 -16
- package/dist/components/page/myCaseManage/_component/_button/Badge.tsx +0 -22
- package/dist/components/page/myCaseManage/_component/_button/SubColor1Button.d.ts +0 -7
- package/dist/components/page/myCaseManage/_component/_button/SubColor1Button.jsx +0 -6
- package/dist/components/page/myCaseManage/_component/_button/SubColor1Button.tsx +0 -20
- package/dist/components/page/myCaseManage/_component/_button/SubMenuButton.d.ts +0 -7
- package/dist/components/page/myCaseManage/_component/_button/SubMenuButton.jsx +0 -6
- package/dist/components/page/myCaseManage/_component/_button/SubMenuButton.tsx +0 -12
- package/dist/components/page/myCaseManage/_component/_empty/EmptyTable.d.ts +0 -6
- package/dist/components/page/myCaseManage/_component/_empty/EmptyTable.jsx +0 -53
- package/dist/components/page/myCaseManage/_component/_empty/EmptyTable.tsx +0 -59
- package/dist/components/page/myCaseManage/_component/_layout/CaseLayout.d.ts +0 -7
- package/dist/components/page/myCaseManage/_component/_layout/CaseLayout.jsx +0 -8
- package/dist/components/page/myCaseManage/_component/_layout/CaseLayout.tsx +0 -20
- package/dist/components/page/myCaseManage/_component/_layout/CaseWrapper.d.ts +0 -11
- package/dist/components/page/myCaseManage/_component/_layout/CaseWrapper.jsx +0 -24
- package/dist/components/page/myCaseManage/_component/_layout/CaseWrapper.tsx +0 -36
- package/dist/components/page/myCaseManage/_component/_layout/HeaderLayout.d.ts +0 -5
- package/dist/components/page/myCaseManage/_component/_layout/HeaderLayout.jsx +0 -4
- package/dist/components/page/myCaseManage/_component/_layout/HeaderLayout.tsx +0 -5
- package/dist/components/page/myCaseManage/_component/_layout/IntroWrapper.d.ts +0 -8
- package/dist/components/page/myCaseManage/_component/_layout/IntroWrapper.jsx +0 -24
- package/dist/components/page/myCaseManage/_component/_layout/IntroWrapper.tsx +0 -43
- package/dist/components/page/myCaseManage/_component/_loading/Loading.d.ts +0 -3
- package/dist/components/page/myCaseManage/_component/_loading/Loading.jsx +0 -90
- package/dist/components/page/myCaseManage/_component/_loading/Loading.tsx +0 -94
- package/dist/components/page/myCaseManage/_component/_pagination/PaginationComponent.d.ts +0 -10
- package/dist/components/page/myCaseManage/_component/_pagination/PaginationComponent.jsx +0 -75
- package/dist/components/page/myCaseManage/_component/_pagination/PaginationComponent.tsx +0 -163
- package/dist/components/page/myCaseManage/_component/_table/CaseTable.d.ts +0 -10
- package/dist/components/page/myCaseManage/_component/_table/CaseTable.jsx +0 -37
- package/dist/components/page/myCaseManage/_component/_table/CaseTable.tsx +0 -62
- package/dist/components/page/myCaseManage/_fetchers/getCase.d.ts +0 -5
- package/dist/components/page/myCaseManage/_fetchers/getCase.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getCase.ts +0 -21
- package/dist/components/page/myCaseManage/_fetchers/getCaseList.d.ts +0 -7
- package/dist/components/page/myCaseManage/_fetchers/getCaseList.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getCaseList.ts +0 -24
- package/dist/components/page/myCaseManage/_fetchers/getCourtFileList.d.ts +0 -5
- package/dist/components/page/myCaseManage/_fetchers/getCourtFileList.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getCourtFileList.ts +0 -21
- package/dist/components/page/myCaseManage/_fetchers/getTimeLine.d.ts +0 -5
- package/dist/components/page/myCaseManage/_fetchers/getTimeLine.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getTimeLine.ts +0 -21
- package/dist/components/page/myCaseManage/_lib/catagoryMenuName.d.ts +0 -8
- package/dist/components/page/myCaseManage/_lib/catagoryMenuName.js +0 -8
- package/dist/components/page/myCaseManage/_lib/catagoryMenuName.ts +0 -11
- package/dist/components/page/myCaseManage/_lib/pagination/locale/ko_KR.d.ts +0 -15
- package/dist/components/page/myCaseManage/_lib/pagination/locale/ko_KR.js +0 -21
- package/dist/components/page/myCaseManage/_type/type.d.ts +0 -64
- package/dist/components/page/myCaseManage/_type/type.js +0 -1
- package/dist/components/page/myCaseManage/_type/type.ts +0 -73
- package/dist/components/page/myCaseManage/index.d.ts +0 -5
- package/dist/components/page/myCaseManage/index.jsx +0 -20
- package/dist/components/page/myCaseManage/index.stories.d.ts +0 -6
- package/dist/components/page/myCaseManage/index.stories.jsx +0 -17
- package/dist/components/page/myCaseManage/index.stories.tsx +0 -28
- package/dist/components/page/myCaseManage/index.tsx +0 -30
|
@@ -1,179 +0,0 @@
|
|
|
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 } from 'next/router';
|
|
10
|
-
import Loading from './_loading/Loading';
|
|
11
|
-
|
|
12
|
-
const CaseTap = ({
|
|
13
|
-
title,
|
|
14
|
-
type,
|
|
15
|
-
tap,
|
|
16
|
-
setTap
|
|
17
|
-
}: {
|
|
18
|
-
title: string;
|
|
19
|
-
type: string;
|
|
20
|
-
tap: string;
|
|
21
|
-
setTap: (tap: string) => void;
|
|
22
|
-
}) => {
|
|
23
|
-
return (
|
|
24
|
-
<button
|
|
25
|
-
onClick={() => {
|
|
26
|
-
if (setTap) {
|
|
27
|
-
setTap(type);
|
|
28
|
-
}
|
|
29
|
-
}}
|
|
30
|
-
className={`items-top flex h-[45px] w-full justify-center border-b-[2px] border-solid transition-colors duration-300 ${
|
|
31
|
-
tap === type ? 'border-black text-black' : 'text-grayScale4 border-grayScale4'
|
|
32
|
-
}`}
|
|
33
|
-
>
|
|
34
|
-
<p className={'lg:body_large1'}>{title}</p>
|
|
35
|
-
</button>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const CaseContainer = ({ jwt }: { jwt: string }) => {
|
|
40
|
-
const router = useRouter();
|
|
41
|
-
const { page, tap, subTap } = router.query;
|
|
42
|
-
const tapState = tap ? (tap as string) : 'ongoing';
|
|
43
|
-
const subTapState = subTap ? subTap : tap ? (tap as string) : 'ongoing';
|
|
44
|
-
const pageSize = 6;
|
|
45
|
-
|
|
46
|
-
const [caseList, setCaseList] = useState<Case[]>([]);
|
|
47
|
-
const [totalLength, setTotalLength] = useState(0);
|
|
48
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
49
|
-
const pageNumber = page ? Number(page) : 1;
|
|
50
|
-
|
|
51
|
-
const handleOnChange = (pageNum: number) => {
|
|
52
|
-
router.push({
|
|
53
|
-
pathname: '/mycase',
|
|
54
|
-
query: { page: pageNum, tap, subTap }
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
const handleOnTap = (tap: string) => {
|
|
58
|
-
router.push({
|
|
59
|
-
pathname: '/mycase',
|
|
60
|
-
query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const handleOnSubTap = (subTap: string) => {
|
|
64
|
-
router.push({
|
|
65
|
-
pathname: '/mycase',
|
|
66
|
-
query: { page: 1, tap, subTap }
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
useQuery({
|
|
71
|
-
queryKey: ['case', tapState, subTapState, pageNumber],
|
|
72
|
-
queryFn: () =>
|
|
73
|
-
getCaseList({
|
|
74
|
-
jwt: jwt,
|
|
75
|
-
size: pageSize,
|
|
76
|
-
state: subTapState as string,
|
|
77
|
-
page: pageNumber
|
|
78
|
-
}),
|
|
79
|
-
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
80
|
-
refetchOnWindowFocus: false,
|
|
81
|
-
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
82
|
-
cacheTime: 0,
|
|
83
|
-
staleTime: 0,
|
|
84
|
-
onSuccess: res => {
|
|
85
|
-
if (res.result) {
|
|
86
|
-
console.log(res);
|
|
87
|
-
setCaseList(res.data.list);
|
|
88
|
-
setTotalLength(res.data.totalLength);
|
|
89
|
-
setIsLoading(false);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
onError: error => {
|
|
93
|
-
console.log(error);
|
|
94
|
-
setIsLoading(false);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
return (
|
|
99
|
-
<CaseLayout outerClassName="lg:mt-[294px] " innerClassName={'lg:py-[60px]'}>
|
|
100
|
-
<div className={''}>
|
|
101
|
-
<div className="flex flex-row items-center lg:px-[60px]">
|
|
102
|
-
<CaseTap title="진행중인 사건" type="ongoing" tap={tapState} setTap={handleOnTap} />
|
|
103
|
-
<CaseTap title="종결된 사건" type="closed" tap={tapState} setTap={handleOnTap} />
|
|
104
|
-
</div>
|
|
105
|
-
<div className={'my-[20px] flex flex-row gap-[28px] lg:px-[60px]'}>
|
|
106
|
-
{tapState === 'ongoing' ? (
|
|
107
|
-
<>
|
|
108
|
-
<SubColor1Button
|
|
109
|
-
title="전체"
|
|
110
|
-
onClick={() => handleOnSubTap('ongoing')}
|
|
111
|
-
isSelected={subTapState === 'ongoing'}
|
|
112
|
-
/>
|
|
113
|
-
|
|
114
|
-
<SubColor1Button
|
|
115
|
-
title="사건접수"
|
|
116
|
-
onClick={() => handleOnSubTap('사건접수')}
|
|
117
|
-
isSelected={subTapState === '사건접수'}
|
|
118
|
-
/>
|
|
119
|
-
<SubColor1Button
|
|
120
|
-
title="사건검토"
|
|
121
|
-
onClick={() => handleOnSubTap('사건검토')}
|
|
122
|
-
isSelected={subTapState === '사건검토'}
|
|
123
|
-
/>
|
|
124
|
-
<SubColor1Button
|
|
125
|
-
title="변호사상담"
|
|
126
|
-
onClick={() => handleOnSubTap('변호사상담')}
|
|
127
|
-
isSelected={subTapState === '변호사상담'}
|
|
128
|
-
/>
|
|
129
|
-
|
|
130
|
-
<SubColor1Button
|
|
131
|
-
title="소송준비"
|
|
132
|
-
onClick={() => handleOnSubTap('소송준비')}
|
|
133
|
-
isSelected={subTapState === '소송준비'}
|
|
134
|
-
/>
|
|
135
|
-
<SubColor1Button
|
|
136
|
-
title="소송진행"
|
|
137
|
-
onClick={() => handleOnSubTap('소송진행')}
|
|
138
|
-
isSelected={subTapState === '소송진행'}
|
|
139
|
-
/>
|
|
140
|
-
</>
|
|
141
|
-
) : (
|
|
142
|
-
<>
|
|
143
|
-
<SubColor1Button
|
|
144
|
-
title="전체"
|
|
145
|
-
onClick={() => handleOnSubTap('closed')}
|
|
146
|
-
isSelected={subTapState === 'closed'}
|
|
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
|
-
)}
|
|
160
|
-
</div>
|
|
161
|
-
{isLoading ? (
|
|
162
|
-
<Loading />
|
|
163
|
-
) : caseList.length > 0 ? (
|
|
164
|
-
<CaseTable
|
|
165
|
-
list={caseList}
|
|
166
|
-
totalLength={totalLength}
|
|
167
|
-
pageSize={pageSize}
|
|
168
|
-
pageNumber={pageNumber}
|
|
169
|
-
onChange={handleOnChange}
|
|
170
|
-
/>
|
|
171
|
-
) : (
|
|
172
|
-
<EmptyTable tap={tapState} subTap={subTapState === 'ongoing' || subTapState === 'closed' ? 0 : 1} />
|
|
173
|
-
)}
|
|
174
|
-
</div>
|
|
175
|
-
</CaseLayout>
|
|
176
|
-
);
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export default CaseContainer;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { catagoryMenuName } from '../../_lib/catagoryMenuName';
|
|
3
|
-
import { useRouter } from 'next/router';
|
|
4
|
-
import Image from 'next/image';
|
|
5
|
-
import Link from 'next/link';
|
|
6
|
-
import arrow2 from '../../../../../asset/images/myCaseManage/arrow_2.webp';
|
|
7
|
-
import nav_arr from '../../../../../asset/images/myCaseManage/nav_arr.webp';
|
|
8
|
-
import home from '../../../../../asset/images/myCaseManage/home.webp';
|
|
9
|
-
import whiteHome from '../../../../../asset/images/myCaseManage/home.svg';
|
|
10
|
-
const CategoryMenu = (props) => {
|
|
11
|
-
const { t, isMargin = true, isWhite = false } = props;
|
|
12
|
-
const router = useRouter();
|
|
13
|
-
const [menu, setMenu] = useState({ title: '', subTitle: '', address: '' });
|
|
14
|
-
//페이지 내부에서 쿼리 파라미터 없이 루트 경로로 돌아갈 때 새로고침
|
|
15
|
-
const reloadUrl = (url) => {
|
|
16
|
-
if (router.pathname === url) {
|
|
17
|
-
router.push(url).then(() => {
|
|
18
|
-
router.reload();
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
setMenu(catagoryMenuName({ url: router.pathname, t }));
|
|
24
|
-
}, [router.pathname, t]);
|
|
25
|
-
const imagePath = isWhite ? whiteHome : home;
|
|
26
|
-
const arrowImage = isWhite ? nav_arr : arrow2;
|
|
27
|
-
const textColor = isWhite ? 'text-[#fff]' : 'text-[#333333]';
|
|
28
|
-
return (<div className={(isMargin ? 'mb-[70px] mr-0 mt-8 lg:mb-[45px] lg:mt-[47px] ' : '') +
|
|
29
|
-
'relative z-10 flex flex-row font-normal leading-[1] tracking-[-0.32px] ' +
|
|
30
|
-
'text-[13px] xs:text-[14px] sm:text-[15px] lg:text-[16px] ' +
|
|
31
|
-
'min-w-[320px] items-center justify-end gap-[10px] lg:w-[100%]'}>
|
|
32
|
-
<Link href="/">
|
|
33
|
-
<Image src={imagePath} alt={'집'} width={15} height={15} className={'mb-[1px] h-auto sm:w-[17px] lg:w-[18px]'}/>
|
|
34
|
-
</Link>
|
|
35
|
-
<Image src={arrowImage} alt={'화살표_1'} width={8} height={13} className={'h-[13px] w-[8px]'}/>
|
|
36
|
-
{menu.title === menu.subTitle ? (<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
37
|
-
<div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.title}</div>
|
|
38
|
-
</Link>) : (<>
|
|
39
|
-
<div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.title}</div>
|
|
40
|
-
<Image src={arrowImage} alt={'화살표_2'} width={8} height={13} className={'h-[13px] w-[8px]'}/>
|
|
41
|
-
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
42
|
-
<div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.subTitle}</div>
|
|
43
|
-
</Link>
|
|
44
|
-
</>)}
|
|
45
|
-
</div>);
|
|
46
|
-
};
|
|
47
|
-
export default CategoryMenu;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { catagoryMenuName } from '../../_lib/catagoryMenuName';
|
|
3
|
-
import { useRouter } from 'next/router';
|
|
4
|
-
import Image from 'next/image';
|
|
5
|
-
import Link from 'next/link';
|
|
6
|
-
import arrow2 from '../../../../../asset/images/myCaseManage/arrow_2.webp';
|
|
7
|
-
import nav_arr from '../../../../../asset/images/myCaseManage/nav_arr.webp';
|
|
8
|
-
import home from '../../../../../asset/images/myCaseManage/home.webp';
|
|
9
|
-
import whiteHome from '../../../../../asset/images/myCaseManage/home.svg';
|
|
10
|
-
|
|
11
|
-
type CategoryMenuType = {
|
|
12
|
-
t: (key: string) => string;
|
|
13
|
-
isMargin?: boolean;
|
|
14
|
-
isWhite?: boolean;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const CategoryMenu = (props: CategoryMenuType) => {
|
|
18
|
-
const { t, isMargin = true, isWhite = false } = props;
|
|
19
|
-
const router = useRouter();
|
|
20
|
-
const [menu, setMenu] = useState({ title: '', subTitle: '', address: '' });
|
|
21
|
-
|
|
22
|
-
//페이지 내부에서 쿼리 파라미터 없이 루트 경로로 돌아갈 때 새로고침
|
|
23
|
-
const reloadUrl = (url: string) => {
|
|
24
|
-
if (router.pathname === url) {
|
|
25
|
-
router.push(url).then(() => {
|
|
26
|
-
router.reload();
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
setMenu(catagoryMenuName({ url: router.pathname, t }));
|
|
32
|
-
}, [router.pathname, t]);
|
|
33
|
-
|
|
34
|
-
const imagePath = isWhite ? whiteHome : home;
|
|
35
|
-
|
|
36
|
-
const arrowImage = isWhite ? nav_arr : arrow2;
|
|
37
|
-
|
|
38
|
-
const textColor = isWhite ? 'text-[#fff]' : 'text-[#333333]';
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div
|
|
42
|
-
className={
|
|
43
|
-
(isMargin ? 'mb-[70px] mr-0 mt-8 lg:mb-[45px] lg:mt-[47px] ' : '') +
|
|
44
|
-
'relative z-10 flex flex-row font-normal leading-[1] tracking-[-0.32px] ' +
|
|
45
|
-
'text-[13px] xs:text-[14px] sm:text-[15px] lg:text-[16px] ' +
|
|
46
|
-
'min-w-[320px] items-center justify-end gap-[10px] lg:w-[100%]'
|
|
47
|
-
}
|
|
48
|
-
>
|
|
49
|
-
<Link href="/">
|
|
50
|
-
<Image
|
|
51
|
-
src={imagePath}
|
|
52
|
-
alt={'집'}
|
|
53
|
-
width={15}
|
|
54
|
-
height={15}
|
|
55
|
-
className={'mb-[1px] h-auto sm:w-[17px] lg:w-[18px]'}
|
|
56
|
-
/>
|
|
57
|
-
</Link>
|
|
58
|
-
<Image src={arrowImage} alt={'화살표_1'} width={8} height={13} className={'h-[13px] w-[8px]'} />
|
|
59
|
-
{menu.title === menu.subTitle ? (
|
|
60
|
-
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
61
|
-
<div className={textColor}>{menu?.title}</div>
|
|
62
|
-
</Link>
|
|
63
|
-
) : (
|
|
64
|
-
<>
|
|
65
|
-
<div className={textColor}>{menu?.title}</div>
|
|
66
|
-
<Image src={arrowImage} alt={'화살표_2'} width={8} height={13} className={'h-[13px] w-[8px]'} />
|
|
67
|
-
<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
|
|
68
|
-
<div className={textColor}>{menu?.subTitle}</div>
|
|
69
|
-
</Link>
|
|
70
|
-
</>
|
|
71
|
-
)}
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default CategoryMenu;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const buttonStyle: {
|
|
3
|
-
사건접수: string;
|
|
4
|
-
사건검토: string;
|
|
5
|
-
변호사상담: string;
|
|
6
|
-
소송준비: string;
|
|
7
|
-
소송진행: string;
|
|
8
|
-
보류: string;
|
|
9
|
-
사건종결: string;
|
|
10
|
-
환불: string;
|
|
11
|
-
};
|
|
12
|
-
declare const Badge: ({ title }: {
|
|
13
|
-
title: keyof typeof buttonStyle;
|
|
14
|
-
}) => import("react").JSX.Element;
|
|
15
|
-
export default Badge;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const buttonStyle = {
|
|
2
|
-
사건접수: 'bg-[#FFDBDB] text-[#5F1A18]',
|
|
3
|
-
사건검토: 'bg-[#F1DCFF] text-[#511396]',
|
|
4
|
-
변호사상담: 'bg-[#AEEDE2] text-[#1D4A45]',
|
|
5
|
-
소송준비: 'bg-[#DED9FF] text-[#1A30AA]',
|
|
6
|
-
소송진행: 'bg-[#C6F5CA] text-[#315B32]',
|
|
7
|
-
보류: 'bg-[#FFF3DB] text-[#644F16]',
|
|
8
|
-
사건종결: 'bg-[#3D3D3D] text-[#FFFFFF]',
|
|
9
|
-
환불: 'bg-[#DBDBDB] text-[#000000]'
|
|
10
|
-
};
|
|
11
|
-
const Badge = ({ title }) => {
|
|
12
|
-
return (<div className={`flex h-[41px] flex-row items-center justify-center rounded-[20px] lg:px-[20px] ${buttonStyle[title]} w-fit`}>
|
|
13
|
-
<p className={`lg:label_large2 `}>{title}</p>
|
|
14
|
-
</div>);
|
|
15
|
-
};
|
|
16
|
-
export default Badge;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const buttonStyle = {
|
|
2
|
-
사건접수: 'bg-[#FFDBDB] text-[#5F1A18]',
|
|
3
|
-
사건검토: 'bg-[#F1DCFF] text-[#511396]',
|
|
4
|
-
변호사상담: 'bg-[#AEEDE2] text-[#1D4A45]',
|
|
5
|
-
소송준비: 'bg-[#DED9FF] text-[#1A30AA]',
|
|
6
|
-
소송진행: 'bg-[#C6F5CA] text-[#315B32]',
|
|
7
|
-
보류: 'bg-[#FFF3DB] text-[#644F16]',
|
|
8
|
-
사건종결: 'bg-[#3D3D3D] text-[#FFFFFF]',
|
|
9
|
-
환불: 'bg-[#DBDBDB] text-[#000000]'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const Badge = ({ title }: { title: keyof typeof buttonStyle }) => {
|
|
13
|
-
return (
|
|
14
|
-
<div
|
|
15
|
-
className={`flex h-[41px] flex-row items-center justify-center rounded-[20px] lg:px-[20px] ${buttonStyle[title]} w-fit`}
|
|
16
|
-
>
|
|
17
|
-
<p className={`lg:label_large2 `}>{title}</p>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default Badge;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const SubColor1Button = ({ title, onClick, isSelected }) => {
|
|
2
|
-
return (<button className={`flex h-[49px] flex-row items-center justify-center rounded-[24px] transition-colors duration-300 lg:px-[12px] xl:px-[20px] ${isSelected ? 'bg-subColor01 text-white' : 'bg-white text-black'}`} onClick={onClick}>
|
|
3
|
-
<p className={'lg:label_large1 lg:text-[18px] xl:text-[20px] '}>{title}</p>
|
|
4
|
-
</button>);
|
|
5
|
-
};
|
|
6
|
-
export default SubColor1Button;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const SubColor1Button = ({
|
|
2
|
-
title,
|
|
3
|
-
onClick,
|
|
4
|
-
isSelected
|
|
5
|
-
}: {
|
|
6
|
-
title: string;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
isSelected: boolean;
|
|
9
|
-
}) => {
|
|
10
|
-
return (
|
|
11
|
-
<button
|
|
12
|
-
className={`flex h-[49px] flex-row items-center justify-center rounded-[24px] transition-colors duration-300 lg:px-[12px] xl:px-[20px] ${isSelected ? 'bg-subColor01 text-white' : 'bg-white text-black'}`}
|
|
13
|
-
onClick={onClick}
|
|
14
|
-
>
|
|
15
|
-
<p className={'lg:label_large1 lg:text-[18px] xl:text-[20px] '}>{title}</p>
|
|
16
|
-
</button>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default SubColor1Button;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const SubMenuButton = ({ onClick, title, isSelected }) => {
|
|
2
|
-
return (<button className={`lg:body_medium2 flex items-center justify-center rounded-[20px] transition-all duration-300 lg:h-[41px] lg:px-[20px] ${isSelected ? 'bg-grayScale1' : 'bg-transparent'}`} onClick={onClick}>
|
|
3
|
-
<p className={`lg:label_large2 ${isSelected ? 'text-white' : 'text-black'}`}>{title}</p>
|
|
4
|
-
</button>);
|
|
5
|
-
};
|
|
6
|
-
export default SubMenuButton;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const SubMenuButton = ({ onClick, title, isSelected }: { onClick: () => void; title: string; isSelected: boolean }) => {
|
|
2
|
-
return (
|
|
3
|
-
<button
|
|
4
|
-
className={`lg:body_medium2 flex items-center justify-center rounded-[20px] transition-all duration-300 lg:h-[41px] lg:px-[20px] ${isSelected ? 'bg-grayScale1' : 'bg-transparent'}`}
|
|
5
|
-
onClick={onClick}
|
|
6
|
-
>
|
|
7
|
-
<p className={`lg:label_large2 ${isSelected ? 'text-white' : 'text-black'}`}>{title}</p>
|
|
8
|
-
</button>
|
|
9
|
-
);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default SubMenuButton;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
|
-
import caseIcon1 from '../../../../../asset/images/myCaseManage/icon/case_icon1.svg';
|
|
3
|
-
import caseIcon2 from '../../../../../asset/images/myCaseManage/icon/case_icon2.svg';
|
|
4
|
-
import caseIcon3 from '../../../../../asset/images/myCaseManage/icon/case_icon3.svg';
|
|
5
|
-
const titleList = {
|
|
6
|
-
ongoing: {
|
|
7
|
-
0: {
|
|
8
|
-
title: '아직 의뢰한 사건이 없어요.',
|
|
9
|
-
subTitle: '상담을 접수하시면 법률 상담을 도와드릴게요!',
|
|
10
|
-
img: caseIcon1,
|
|
11
|
-
width: 60,
|
|
12
|
-
height: 66,
|
|
13
|
-
marginTop: '85px'
|
|
14
|
-
},
|
|
15
|
-
1: {
|
|
16
|
-
title: '해당 사건이 없어요.',
|
|
17
|
-
subTitle: '',
|
|
18
|
-
img: caseIcon2,
|
|
19
|
-
width: 66,
|
|
20
|
-
height: 66,
|
|
21
|
-
marginTop: '105px'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
closed: {
|
|
25
|
-
0: {
|
|
26
|
-
title: '종결된 사건이 없어요.',
|
|
27
|
-
subTitle: '',
|
|
28
|
-
img: caseIcon3,
|
|
29
|
-
width: 59.4,
|
|
30
|
-
height: 66,
|
|
31
|
-
marginTop: '103px'
|
|
32
|
-
},
|
|
33
|
-
1: {
|
|
34
|
-
title: '종결된 사건이 없어요.',
|
|
35
|
-
subTitle: '',
|
|
36
|
-
img: caseIcon3,
|
|
37
|
-
width: 59.4,
|
|
38
|
-
height: 66,
|
|
39
|
-
marginTop: '103px'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const EmptyTable = ({ tap, subTap }) => {
|
|
44
|
-
const { title, subTitle, img, width, height, marginTop } = titleList[tap][subTap];
|
|
45
|
-
return (<div className="flex min-h-[350px] w-full flex-col items-center gap-[40px]" style={{ paddingTop: marginTop }}>
|
|
46
|
-
<Image src={img} alt="case_icon" width={width} height={height}/>
|
|
47
|
-
<div className="flex flex-col items-center justify-center ">
|
|
48
|
-
<p className="lg:body_medium1">{title}</p>
|
|
49
|
-
{subTitle && <p className="lg:body_medium1">{subTitle}</p>}
|
|
50
|
-
</div>
|
|
51
|
-
</div>);
|
|
52
|
-
};
|
|
53
|
-
export default EmptyTable;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
|
-
import caseIcon1 from '../../../../../asset/images/myCaseManage/icon/case_icon1.svg';
|
|
3
|
-
import caseIcon2 from '../../../../../asset/images/myCaseManage/icon/case_icon2.svg';
|
|
4
|
-
import caseIcon3 from '../../../../../asset/images/myCaseManage/icon/case_icon3.svg';
|
|
5
|
-
|
|
6
|
-
const titleList = {
|
|
7
|
-
ongoing: {
|
|
8
|
-
0: {
|
|
9
|
-
title: '아직 의뢰한 사건이 없어요.',
|
|
10
|
-
subTitle: '상담을 접수하시면 법률 상담을 도와드릴게요!',
|
|
11
|
-
img: caseIcon1,
|
|
12
|
-
width: 60,
|
|
13
|
-
height: 66,
|
|
14
|
-
marginTop: '85px'
|
|
15
|
-
},
|
|
16
|
-
1: {
|
|
17
|
-
title: '해당 사건이 없어요.',
|
|
18
|
-
subTitle: '',
|
|
19
|
-
img: caseIcon2,
|
|
20
|
-
width: 66,
|
|
21
|
-
height: 66,
|
|
22
|
-
marginTop: '105px'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
closed: {
|
|
26
|
-
0: {
|
|
27
|
-
title: '종결된 사건이 없어요.',
|
|
28
|
-
subTitle: '',
|
|
29
|
-
img: caseIcon3,
|
|
30
|
-
width: 59.4,
|
|
31
|
-
height: 66,
|
|
32
|
-
marginTop: '103px'
|
|
33
|
-
},
|
|
34
|
-
1: {
|
|
35
|
-
title: '종결된 사건이 없어요.',
|
|
36
|
-
subTitle: '',
|
|
37
|
-
img: caseIcon3,
|
|
38
|
-
width: 59.4,
|
|
39
|
-
height: 66,
|
|
40
|
-
marginTop: '103px'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const EmptyTable = ({ tap, subTap }: { tap: string; subTap: number }) => {
|
|
46
|
-
const { title, subTitle, img, width, height, marginTop } =
|
|
47
|
-
titleList[tap as keyof typeof titleList][subTap as keyof (typeof titleList)[keyof typeof titleList]];
|
|
48
|
-
return (
|
|
49
|
-
<div className="flex min-h-[350px] w-full flex-col items-center gap-[40px]" style={{ paddingTop: marginTop }}>
|
|
50
|
-
<Image src={img} alt="case_icon" width={width} height={height} />
|
|
51
|
-
<div className="flex flex-col items-center justify-center ">
|
|
52
|
-
<p className="lg:body_medium1">{title}</p>
|
|
53
|
-
{subTitle && <p className="lg:body_medium1">{subTitle}</p>}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default EmptyTable;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const CaseLayout: ({ outerClassName, innerClassName, children }: {
|
|
3
|
-
outerClassName?: string | undefined;
|
|
4
|
-
innerClassName?: string | undefined;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
}) => import("react").JSX.Element;
|
|
7
|
-
export default CaseLayout;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { twMerge } from 'tailwind-merge';
|
|
2
|
-
import CaseWrapper from './CaseWrapper';
|
|
3
|
-
const CaseLayout = ({ outerClassName, innerClassName, children }) => {
|
|
4
|
-
return (<CaseWrapper className={outerClassName}>
|
|
5
|
-
<div className={twMerge('bg-grayScale8 z-[1] w-full rounded-[36px] ' + innerClassName)}>{children}</div>
|
|
6
|
-
</CaseWrapper>);
|
|
7
|
-
};
|
|
8
|
-
export default CaseLayout;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { twMerge } from 'tailwind-merge';
|
|
2
|
-
import CaseWrapper from './CaseWrapper';
|
|
3
|
-
import HeaderLayout from './HeaderLayout';
|
|
4
|
-
const CaseLayout = ({
|
|
5
|
-
outerClassName,
|
|
6
|
-
innerClassName,
|
|
7
|
-
children
|
|
8
|
-
}: {
|
|
9
|
-
outerClassName?: string;
|
|
10
|
-
innerClassName?: string;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}) => {
|
|
13
|
-
return (
|
|
14
|
-
<CaseWrapper className={outerClassName}>
|
|
15
|
-
<div className={twMerge('bg-grayScale8 z-[1] w-full rounded-[36px] ' + innerClassName)}>{children}</div>
|
|
16
|
-
</CaseWrapper>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default CaseLayout;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
interface WrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
innerClassName?: string;
|
|
6
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
-
isLine?: boolean;
|
|
8
|
-
isLinePadding?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const CaseWrapper: React.FC<WrapperProps>;
|
|
11
|
-
export default CaseWrapper;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React, { useRef } from 'react';
|
|
13
|
-
const CaseWrapper = (_a) => {
|
|
14
|
-
var { children, className = '', ref = null,
|
|
15
|
-
// isLine,
|
|
16
|
-
// isLinePadding = true,
|
|
17
|
-
innerClassName } = _a, others = __rest(_a, ["children", "className", "ref", "innerClassName"]);
|
|
18
|
-
const lineRef = useRef(null);
|
|
19
|
-
// const { flagStandardBoolean } = useElementObserve(lineRef, 0.2);
|
|
20
|
-
return (<div className={' mx-auto h-full w-full max-w-[1520px] lg:px-[80px] 3xl:px-[140px] 6xl:px-0 ' + className} ref={ref} {...others}>
|
|
21
|
-
{children}
|
|
22
|
-
</div>);
|
|
23
|
-
};
|
|
24
|
-
export default CaseWrapper;
|