@daeryun/dr_components 0.2.80 → 0.2.82
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/components/page/MyCase/[id]/MyCaseDetailApp.tsx +1 -0
- package/dist/components/page/MyCase/[id]/MyCaseDetailPage.jsx +0 -1
- package/dist/components/page/MyCase/[id]/MyCaseDetailPage.tsx +0 -1
- package/dist/components/page/MyCase/_component/CaseAppContainer.jsx +23 -16
- package/dist/components/page/MyCase/_component/CaseAppContainer.tsx +27 -20
- package/dist/components/page/MyCase/_component/CasePageContainer.jsx +13 -25
- package/dist/components/page/MyCase/_component/CasePageContainer.tsx +18 -29
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -4,11 +4,12 @@ import CaseLayout from './_layout/CaseLayout';
|
|
|
4
4
|
import SubColor1Button from './_button/SubColor1Button';
|
|
5
5
|
import CaseTable from './_table/CaseTable';
|
|
6
6
|
import EmptyTable from './_empty/EmptyTable';
|
|
7
|
-
import { useRouter
|
|
7
|
+
import { useRouter } from 'next/router';
|
|
8
8
|
import Loading from './_loading/Loading';
|
|
9
9
|
import { useGetCaseList } from '../_actions/action';
|
|
10
10
|
import CaseTabSwiper from './_table/CaseTabSwiper';
|
|
11
|
-
import
|
|
11
|
+
import CaseTableMoPage from './_table/CaseTableMoPage';
|
|
12
|
+
// import { useCompatibleRouter } from '../../../lib/router/useCompatibleRouter';
|
|
12
13
|
const CaseTap = ({ title, type, tap, setTap }) => {
|
|
13
14
|
return (<button onClick={() => {
|
|
14
15
|
if (setTap) {
|
|
@@ -19,28 +20,34 @@ const CaseTap = ({ title, type, tap, setTap }) => {
|
|
|
19
20
|
</button>);
|
|
20
21
|
};
|
|
21
22
|
const CaseContainer = () => {
|
|
22
|
-
|
|
23
|
-
// const searchParams = useSearchParams();
|
|
23
|
+
// const { router, searchParams } = useCompatibleRouter();
|
|
24
24
|
const router = useRouter();
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const { page, tap, subTap } = router.query;
|
|
26
|
+
// const searchParams = useSearchParams();
|
|
27
|
+
// const searchParams = useSearchParams();
|
|
28
|
+
// const { page, tap, subTap } = searchParams ? Object.fromEntries(searchParams.entries()) : {};
|
|
29
29
|
const tapState = tap ? tap : 'ongoing';
|
|
30
30
|
const subTapState = subTap ? subTap : tap ? tap : 'ongoing';
|
|
31
31
|
const [pageSize, setPageSize] = useState(6);
|
|
32
|
-
const [caseList, setCaseList] = useState([]);
|
|
33
|
-
const [totalLength, setTotalLength] = useState(0);
|
|
34
32
|
// const [isLoading, setIsLoading] = useState(true);
|
|
35
33
|
const pageNumber = page ? Number(page) : 1;
|
|
36
34
|
const handleOnChange = (pageNum) => {
|
|
37
|
-
router.push(
|
|
35
|
+
router.push({
|
|
36
|
+
pathname: '/mycase',
|
|
37
|
+
query: { page: pageNum, tap, subTap }
|
|
38
|
+
});
|
|
38
39
|
};
|
|
39
40
|
const handleOnTap = (tap) => {
|
|
40
|
-
router.push(
|
|
41
|
+
router.push({
|
|
42
|
+
pathname: '/mycase',
|
|
43
|
+
query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
|
|
44
|
+
});
|
|
41
45
|
};
|
|
42
46
|
const handleOnSubTap = (subTap) => {
|
|
43
|
-
router.push(
|
|
47
|
+
router.push({
|
|
48
|
+
pathname: '/mycase',
|
|
49
|
+
query: { page: 1, tap, subTap }
|
|
50
|
+
});
|
|
44
51
|
};
|
|
45
52
|
const { data, isLoading } = useGetCaseList({
|
|
46
53
|
tapState,
|
|
@@ -100,9 +107,9 @@ const CaseContainer = () => {
|
|
|
100
107
|
</div>
|
|
101
108
|
</>)}
|
|
102
109
|
</div>
|
|
103
|
-
{isLoading ? (<Loading />) : (
|
|
104
|
-
<CaseTable list={
|
|
105
|
-
<
|
|
110
|
+
{isLoading ? (<Loading />) : (data === null || data === void 0 ? void 0 : data.list.length) > 0 ? (<>
|
|
111
|
+
<CaseTable 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}/>
|
|
112
|
+
<CaseTableMoPage 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}/>
|
|
106
113
|
</>) : (<EmptyTable tap={tapState} subTap={subTapState === 'ongoing' || subTapState === 'closed' ? 0 : 1}/>)}
|
|
107
114
|
</div>
|
|
108
115
|
</CaseLayout>);
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import CaseLayout from './_layout/CaseLayout';
|
|
4
4
|
import SubColor1Button from './_button/SubColor1Button';
|
|
5
|
-
|
|
6
5
|
import CaseTable from './_table/CaseTable';
|
|
7
|
-
import { Case } from '../_type/type';
|
|
8
6
|
import EmptyTable from './_empty/EmptyTable';
|
|
9
|
-
import { useRouter
|
|
7
|
+
import { useRouter } from 'next/router';
|
|
10
8
|
import Loading from './_loading/Loading';
|
|
11
9
|
import { useGetCaseList } from '../_actions/action';
|
|
12
10
|
import CaseTabSwiper from './_table/CaseTabSwiper';
|
|
13
|
-
|
|
11
|
+
|
|
12
|
+
import CaseTableMoPage from './_table/CaseTableMoPage';
|
|
13
|
+
// import { useCompatibleRouter } from '../../../lib/router/useCompatibleRouter';
|
|
14
14
|
|
|
15
15
|
const CaseTap = ({
|
|
16
16
|
title,
|
|
@@ -40,29 +40,36 @@ const CaseTap = ({
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
const CaseContainer = () => {
|
|
43
|
-
// const searchParams =
|
|
43
|
+
// const { router, searchParams } = useCompatibleRouter();
|
|
44
44
|
const router = useRouter();
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const { page, tap, subTap } = router.query;
|
|
46
|
+
// const searchParams = useSearchParams();
|
|
47
|
+
// const searchParams = useSearchParams();
|
|
48
|
+
// const { page, tap, subTap } = searchParams ? Object.fromEntries(searchParams.entries()) : {};
|
|
49
49
|
const tapState = tap ? (tap as string) : 'ongoing';
|
|
50
50
|
const subTapState = subTap ? (subTap as string) : tap ? (tap as string) : 'ongoing';
|
|
51
51
|
const [pageSize, setPageSize] = useState(6);
|
|
52
52
|
|
|
53
|
-
const [caseList, setCaseList] = useState<Case[]>([]);
|
|
54
|
-
const [totalLength, setTotalLength] = useState(0);
|
|
55
53
|
// const [isLoading, setIsLoading] = useState(true);
|
|
56
54
|
const pageNumber = page ? Number(page) : 1;
|
|
57
55
|
|
|
58
56
|
const handleOnChange = (pageNum: number) => {
|
|
59
|
-
router.push(
|
|
57
|
+
router.push({
|
|
58
|
+
pathname: '/mycase',
|
|
59
|
+
query: { page: pageNum, tap, subTap }
|
|
60
|
+
});
|
|
60
61
|
};
|
|
61
62
|
const handleOnTap = (tap: string) => {
|
|
62
|
-
router.push(
|
|
63
|
+
router.push({
|
|
64
|
+
pathname: '/mycase',
|
|
65
|
+
query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
|
|
66
|
+
});
|
|
63
67
|
};
|
|
64
68
|
const handleOnSubTap = (subTap: string) => {
|
|
65
|
-
router.push(
|
|
69
|
+
router.push({
|
|
70
|
+
pathname: '/mycase',
|
|
71
|
+
query: { page: 1, tap, subTap }
|
|
72
|
+
});
|
|
66
73
|
};
|
|
67
74
|
|
|
68
75
|
const { data, isLoading } = useGetCaseList({
|
|
@@ -219,18 +226,18 @@ const CaseContainer = () => {
|
|
|
219
226
|
</div>
|
|
220
227
|
{isLoading ? (
|
|
221
228
|
<Loading />
|
|
222
|
-
) : data?.
|
|
229
|
+
) : data?.list.length > 0 ? (
|
|
223
230
|
<>
|
|
224
231
|
<CaseTable
|
|
225
|
-
list={data?.
|
|
226
|
-
totalLength={data?.
|
|
232
|
+
list={data?.list}
|
|
233
|
+
totalLength={data?.totalLength}
|
|
227
234
|
pageSize={pageSize}
|
|
228
235
|
pageNumber={pageNumber}
|
|
229
236
|
onChange={handleOnChange}
|
|
230
237
|
/>
|
|
231
|
-
<
|
|
232
|
-
list={data?.
|
|
233
|
-
totalLength={data?.
|
|
238
|
+
<CaseTableMoPage
|
|
239
|
+
list={data?.list}
|
|
240
|
+
totalLength={data?.totalLength}
|
|
234
241
|
pageSize={pageSize}
|
|
235
242
|
pageNumber={pageNumber}
|
|
236
243
|
onChange={handleOnChange}
|
|
@@ -4,12 +4,11 @@ import CaseLayout from './_layout/CaseLayout';
|
|
|
4
4
|
import SubColor1Button from './_button/SubColor1Button';
|
|
5
5
|
import CaseTable from './_table/CaseTable';
|
|
6
6
|
import EmptyTable from './_empty/EmptyTable';
|
|
7
|
-
import { useRouter } from 'next/
|
|
7
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
8
8
|
import Loading from './_loading/Loading';
|
|
9
9
|
import { useGetCaseList } from '../_actions/action';
|
|
10
10
|
import CaseTabSwiper from './_table/CaseTabSwiper';
|
|
11
|
-
import
|
|
12
|
-
// import { useCompatibleRouter } from '../../../lib/router/useCompatibleRouter';
|
|
11
|
+
import CaseTableMo from './_table/CaseTableMo';
|
|
13
12
|
const CaseTap = ({ title, type, tap, setTap }) => {
|
|
14
13
|
return (<button onClick={() => {
|
|
15
14
|
if (setTap) {
|
|
@@ -20,34 +19,25 @@ const CaseTap = ({ title, type, tap, setTap }) => {
|
|
|
20
19
|
</button>);
|
|
21
20
|
};
|
|
22
21
|
const CaseContainer = () => {
|
|
23
|
-
|
|
22
|
+
var _a, _b, _c, _d, _e;
|
|
24
23
|
const router = useRouter();
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
// const searchParams = useSearchParams();
|
|
28
|
-
// const { page, tap, subTap } = searchParams ? Object.fromEntries(searchParams.entries()) : {};
|
|
24
|
+
const searchParams = useSearchParams();
|
|
25
|
+
const { page, tap, subTap } = searchParams ? Object.fromEntries(searchParams.entries()) : {};
|
|
29
26
|
const tapState = tap ? tap : 'ongoing';
|
|
30
27
|
const subTapState = subTap ? subTap : tap ? tap : 'ongoing';
|
|
31
28
|
const [pageSize, setPageSize] = useState(6);
|
|
29
|
+
const [caseList, setCaseList] = useState([]);
|
|
30
|
+
const [totalLength, setTotalLength] = useState(0);
|
|
32
31
|
// const [isLoading, setIsLoading] = useState(true);
|
|
33
32
|
const pageNumber = page ? Number(page) : 1;
|
|
34
33
|
const handleOnChange = (pageNum) => {
|
|
35
|
-
router.push({
|
|
36
|
-
pathname: '/mycase',
|
|
37
|
-
query: { page: pageNum, tap, subTap }
|
|
38
|
-
});
|
|
34
|
+
router.push(`/mycase?page=${pageNum}&tap=${tap}&subTap=${subTap}`);
|
|
39
35
|
};
|
|
40
36
|
const handleOnTap = (tap) => {
|
|
41
|
-
router.push({
|
|
42
|
-
pathname: '/mycase',
|
|
43
|
-
query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
|
|
44
|
-
});
|
|
37
|
+
router.push(`/mycase?page=${page}&tap=${tap}&subTap=${tap === 'ongoing' ? 'ongoing' : 'closed'}`);
|
|
45
38
|
};
|
|
46
39
|
const handleOnSubTap = (subTap) => {
|
|
47
|
-
router.push({
|
|
48
|
-
pathname: '/mycase',
|
|
49
|
-
query: { page: 1, tap, subTap }
|
|
50
|
-
});
|
|
40
|
+
router.push(`/mycase?page=1&tap=${tap}&subTap=${subTap}`);
|
|
51
41
|
};
|
|
52
42
|
const { data, isLoading } = useGetCaseList({
|
|
53
43
|
tapState,
|
|
@@ -62,8 +52,6 @@ const CaseContainer = () => {
|
|
|
62
52
|
window.addEventListener('resize', handleResize);
|
|
63
53
|
return () => window.removeEventListener('resize', handleResize);
|
|
64
54
|
}, []);
|
|
65
|
-
console.log(data);
|
|
66
|
-
console.log(data === null || data === void 0 ? void 0 : data.list);
|
|
67
55
|
return (<CaseLayout outerClassName="mt-[230px] sm-top:mt-[310px] lg:mt-[294px] " innerClassName={'py-[40px] sm-top:py-[52px] lg:py-[60px]'} isMobilePadding={false}>
|
|
68
56
|
<div className={''}>
|
|
69
57
|
<div className="sm-top:px-[50px] flex flex-row items-center px-[20px] 2sm:px-[40px] lg:px-[60px]">
|
|
@@ -109,9 +97,9 @@ const CaseContainer = () => {
|
|
|
109
97
|
</div>
|
|
110
98
|
</>)}
|
|
111
99
|
</div>
|
|
112
|
-
{isLoading ? (<Loading />) : (data === null || data === void 0 ? void 0 : data.list.length) > 0 ? (<>
|
|
113
|
-
<CaseTable 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}/>
|
|
114
|
-
<
|
|
100
|
+
{isLoading ? (<Loading />) : ((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.list.length) > 0 ? (<>
|
|
101
|
+
<CaseTable list={(_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.list} totalLength={(_c = data === null || data === void 0 ? void 0 : data.data) === null || _c === void 0 ? void 0 : _c.totalLength} pageSize={pageSize} pageNumber={pageNumber} onChange={handleOnChange}/>
|
|
102
|
+
<CaseTableMo list={(_d = data === null || data === void 0 ? void 0 : data.data) === null || _d === void 0 ? void 0 : _d.list} totalLength={(_e = data === null || data === void 0 ? void 0 : data.data) === null || _e === void 0 ? void 0 : _e.totalLength} pageSize={pageSize} pageNumber={pageNumber} onChange={handleOnChange}/>
|
|
115
103
|
</>) : (<EmptyTable tap={tapState} subTap={subTapState === 'ongoing' || subTapState === 'closed' ? 0 : 1}/>)}
|
|
116
104
|
</div>
|
|
117
105
|
</CaseLayout>);
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import CaseLayout from './_layout/CaseLayout';
|
|
4
4
|
import SubColor1Button from './_button/SubColor1Button';
|
|
5
|
+
|
|
5
6
|
import CaseTable from './_table/CaseTable';
|
|
7
|
+
import { Case } from '../_type/type';
|
|
6
8
|
import EmptyTable from './_empty/EmptyTable';
|
|
7
|
-
import { useRouter } from 'next/
|
|
9
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
8
10
|
import Loading from './_loading/Loading';
|
|
9
11
|
import { useGetCaseList } from '../_actions/action';
|
|
10
12
|
import CaseTabSwiper from './_table/CaseTabSwiper';
|
|
11
|
-
|
|
12
|
-
import CaseTableMoPage from './_table/CaseTableMoPage';
|
|
13
|
-
// import { useCompatibleRouter } from '../../../lib/router/useCompatibleRouter';
|
|
13
|
+
import CaseTableMo from './_table/CaseTableMo';
|
|
14
14
|
|
|
15
15
|
const CaseTap = ({
|
|
16
16
|
title,
|
|
@@ -40,36 +40,27 @@ const CaseTap = ({
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
const CaseContainer = () => {
|
|
43
|
-
// const { router, searchParams } = useCompatibleRouter();
|
|
44
43
|
const router = useRouter();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// const { page, tap, subTap } = searchParams ? Object.fromEntries(searchParams.entries()) : {};
|
|
44
|
+
|
|
45
|
+
const searchParams = useSearchParams();
|
|
46
|
+
const { page, tap, subTap } = searchParams ? Object.fromEntries(searchParams.entries()) : {};
|
|
49
47
|
const tapState = tap ? (tap as string) : 'ongoing';
|
|
50
48
|
const subTapState = subTap ? (subTap as string) : tap ? (tap as string) : 'ongoing';
|
|
51
49
|
const [pageSize, setPageSize] = useState(6);
|
|
52
50
|
|
|
51
|
+
const [caseList, setCaseList] = useState<Case[]>([]);
|
|
52
|
+
const [totalLength, setTotalLength] = useState(0);
|
|
53
53
|
// const [isLoading, setIsLoading] = useState(true);
|
|
54
54
|
const pageNumber = page ? Number(page) : 1;
|
|
55
55
|
|
|
56
56
|
const handleOnChange = (pageNum: number) => {
|
|
57
|
-
router.push({
|
|
58
|
-
pathname: '/mycase',
|
|
59
|
-
query: { page: pageNum, tap, subTap }
|
|
60
|
-
});
|
|
57
|
+
router.push(`/mycase?page=${pageNum}&tap=${tap}&subTap=${subTap}`);
|
|
61
58
|
};
|
|
62
59
|
const handleOnTap = (tap: string) => {
|
|
63
|
-
router.push({
|
|
64
|
-
pathname: '/mycase',
|
|
65
|
-
query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
|
|
66
|
-
});
|
|
60
|
+
router.push(`/mycase?page=${page}&tap=${tap}&subTap=${tap === 'ongoing' ? 'ongoing' : 'closed'}`);
|
|
67
61
|
};
|
|
68
62
|
const handleOnSubTap = (subTap: string) => {
|
|
69
|
-
router.push({
|
|
70
|
-
pathname: '/mycase',
|
|
71
|
-
query: { page: 1, tap, subTap }
|
|
72
|
-
});
|
|
63
|
+
router.push(`/mycase?page=1&tap=${tap}&subTap=${subTap}`);
|
|
73
64
|
};
|
|
74
65
|
|
|
75
66
|
const { data, isLoading } = useGetCaseList({
|
|
@@ -86,8 +77,6 @@ const CaseContainer = () => {
|
|
|
86
77
|
window.addEventListener('resize', handleResize);
|
|
87
78
|
return () => window.removeEventListener('resize', handleResize);
|
|
88
79
|
}, []);
|
|
89
|
-
console.log(data);
|
|
90
|
-
console.log(data?.list);
|
|
91
80
|
|
|
92
81
|
return (
|
|
93
82
|
<CaseLayout
|
|
@@ -228,18 +217,18 @@ const CaseContainer = () => {
|
|
|
228
217
|
</div>
|
|
229
218
|
{isLoading ? (
|
|
230
219
|
<Loading />
|
|
231
|
-
) : data?.list.length > 0 ? (
|
|
220
|
+
) : data?.data?.list.length > 0 ? (
|
|
232
221
|
<>
|
|
233
222
|
<CaseTable
|
|
234
|
-
list={data?.list}
|
|
235
|
-
totalLength={data?.totalLength}
|
|
223
|
+
list={data?.data?.list}
|
|
224
|
+
totalLength={data?.data?.totalLength}
|
|
236
225
|
pageSize={pageSize}
|
|
237
226
|
pageNumber={pageNumber}
|
|
238
227
|
onChange={handleOnChange}
|
|
239
228
|
/>
|
|
240
|
-
<
|
|
241
|
-
list={data?.list}
|
|
242
|
-
totalLength={data?.totalLength}
|
|
229
|
+
<CaseTableMo
|
|
230
|
+
list={data?.data?.list}
|
|
231
|
+
totalLength={data?.data?.totalLength}
|
|
243
232
|
pageSize={pageSize}
|
|
244
233
|
pageNumber={pageNumber}
|
|
245
234
|
onChange={handleOnChange}
|