@daeryun/dr_components 0.3.22 → 0.3.24

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.
Files changed (27) hide show
  1. package/dist/components/page/Login/Login.jsx +5 -102
  2. package/dist/components/page/Login/Login.tsx +5 -142
  3. package/dist/components/page/Login/LoginComp/LoginContainer.d.ts +6 -0
  4. package/dist/components/page/Login/LoginComp/LoginContainer.jsx +112 -0
  5. package/dist/components/page/Login/LoginComp/LoginContainer.tsx +169 -0
  6. package/dist/components/page/Login/LoginComp/SignContainer.d.ts +27 -0
  7. package/dist/components/page/Login/LoginComp/SignContainer.jsx +623 -0
  8. package/dist/components/page/Login/LoginComp/SignContainer.tsx +963 -0
  9. package/dist/components/page/Login/Sign.jsx +5 -611
  10. package/dist/components/page/Login/Sign.tsx +5 -864
  11. package/dist/components/page/MyCase/MyCasePage.jsx +4 -2
  12. package/dist/components/page/MyCase/MyCasePage.tsx +4 -2
  13. package/dist/components/page/MyCase/[id]/MyCaseDetailPage.jsx +5 -75
  14. package/dist/components/page/MyCase/[id]/MyCaseDetailPage.tsx +5 -143
  15. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.d.ts +5 -0
  16. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +80 -0
  17. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +153 -0
  18. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +4 -2
  19. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +4 -2
  20. package/dist/components/page/MyCase/_component/CaseContainer.jsx +99 -97
  21. package/dist/components/page/MyCase/_component/CaseContainer.tsx +32 -30
  22. package/dist/components/page/MyCase/_component/_table/CaseTable.jsx +18 -15
  23. package/dist/components/page/MyCase/_component/_table/CaseTable.tsx +18 -15
  24. package/dist/components/page/MyCase/_component/_table/CaseTableMo.jsx +5 -2
  25. package/dist/components/page/MyCase/_component/_table/CaseTableMo.tsx +5 -2
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import React from 'react';
2
+ import React, { Suspense } from 'react';
3
3
  import IntroWrapper from './_component/_layout/IntroWrapper';
4
4
  import CaseContainer from './_component/CaseContainer';
5
5
  import HeaderLayout from './_component/_layout/HeaderLayout';
@@ -14,7 +14,9 @@ const MyCasePage = ({ jwt }) => {
14
14
  <div className={'relative z-[1]'}>
15
15
  {/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
16
16
  <HeaderLayout>
17
- <CaseContainer jwt={jwt}/>
17
+ <Suspense>
18
+ <CaseContainer jwt={jwt}/>
19
+ </Suspense>
18
20
  </HeaderLayout>
19
21
  </div>
20
22
  </div>);
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import React from 'react';
3
+ import React, { Suspense } from 'react';
4
4
 
5
5
  import IntroWrapper from './_component/_layout/IntroWrapper';
6
6
  import CaseContainer from './_component/CaseContainer';
@@ -25,7 +25,9 @@ const MyCasePage = ({ jwt }: { jwt?: string }) => {
25
25
  <div className={'relative z-[1]'}>
26
26
  {/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
27
27
  <HeaderLayout>
28
- <CaseContainer jwt={jwt} />
28
+ <Suspense>
29
+ <CaseContainer jwt={jwt} />
30
+ </Suspense>
29
31
  </HeaderLayout>
30
32
  </div>
31
33
  </div>
@@ -1,79 +1,9 @@
1
1
  'use client';
2
- import React, { useState } from 'react';
3
- import { useTranslation } from 'next-i18next';
4
- import IntroWrapper from '../_component/_layout/IntroWrapper';
5
- import SubMenuButton from '../_component/_button/SubMenuButton';
6
- import HeaderLayout from '../_component/_layout/HeaderLayout';
7
- import DetailInfo from './_component/DetailInfo';
8
- import { useParams, useRouter, useSearchParams } from 'next/navigation';
9
- import { actionGetDetailList, actionGetMyCaseQuestion, actionGetTimeLine } from '../_actions/action';
10
- import background from '../../../../asset/images/myCase/background.webp';
11
- import backgroundTb from '../../../../asset/images/myCase/background_tb.webp';
12
- import backgroundMo from '../../../../asset/images/myCase/background_mo.webp';
13
- import TimeLine from './_component/TimeLine';
14
- import ContactInfo from './_component/ContactInfo';
15
- import CaseInquiry from './_component/_caseInquiry/CaseInquiry';
16
- import CaseTabSwiper from '../_component/_table/CaseTabSwiper';
2
+ import React, { Suspense } from 'react';
3
+ import MyCaseDetailPageContainer from './_component/MyCaseDetailPageContainer';
17
4
  const MyCaseDetailPage = ({ jwt }) => {
18
- var _a;
19
- const { t } = useTranslation('common');
20
- const [selected, setSelected] = useState('사건 정보');
21
- const router = useRouter();
22
- const searchParams = useSearchParams();
23
- const params = useParams();
24
- const id = params === null || params === void 0 ? void 0 : params.id;
25
- const { page, tap, subTap } = Object.fromEntries(searchParams.entries());
26
- const pageNumber = page ? Number(page) : 1;
27
- const [pageSize, setPageSize] = useState(3);
28
- const { data: detailList, isLoading: detailListLoading } = actionGetDetailList(id, jwt);
29
- const { data: timeLine, isLoading: timeLineLoading } = actionGetTimeLine(id, jwt);
30
- // const { data: courtFileList, isLoading: courtFileListLoading } = actionGetCourtFileList(id as string, jwt);
31
- // const { data: myFileList, isLoading: myFileListLoading } = actionGetMyFileList(id as string, jwt);
32
- const { data: myCaseQuestion, isLoading: myCaseQuestionLoading, refetch: myCaseQuestionRefetch } = actionGetMyCaseQuestion(id, pageNumber, pageSize, jwt);
33
- return (<div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
34
- <IntroWrapper title={'상세 사건 정보'} subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'} backgroundImage={background} backgroundTbImage={backgroundTb} backgroundMoImage={backgroundMo} outerClassName="h-[300px] sm-top:h-[448px] lg:h-[513px]"/>
35
-
36
- <div className={'relative z-[1] '}>
37
- {/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
38
- <HeaderLayout>
39
- <div className="sm-top:mt-[283px] mt-[210px] lg:mt-[302px] ">
40
- <div className="sm-top:gap-[32px] flex items-center justify-center gap-[16px] max-[415px]:hidden lg:gap-[28px]">
41
- <SubMenuButton title="사건 정보" isSelected={selected === '사건 정보'} onClick={() => setSelected('사건 정보')}/>
42
- <SubMenuButton title="사건 타임라인" isSelected={selected === '사건 타임라인'} onClick={() => setSelected('사건 타임라인')}/>
43
- {/* <SubMenuButton
44
- title="문서함"
45
- isSelected={selected === '문서함'}
46
- onClick={() => setSelected('문서함')}
47
- /> */}
48
- <SubMenuButton title="계약정보" isSelected={selected === '계약정보'} onClick={() => setSelected('계약정보')}/>
49
- <SubMenuButton title="사건문의" isSelected={selected === '사건문의'} onClick={() => setSelected('사건문의')}/>
50
- </div>
51
- <div className="hidden max-[415px]:block 2sm:pl-[40px]">
52
- <CaseTabSwiper id="case-tab-swiper3" scrollClassName="max-[415px]:!block">
53
- <SubMenuButton title="사건 정보" isSelected={selected === '사건 정보'} onClick={() => setSelected('사건 정보')} outerClassName="ml-[20px]"/>
54
- <SubMenuButton title="사건 타임라인" isSelected={selected === '사건 타임라인'} onClick={() => setSelected('사건 타임라인')}/>
55
- {/* <SubMenuButton
56
- title="문서함"
57
- isSelected={selected === '문서함'}
58
- onClick={() => setSelected('문서함')}
59
- /> */}
60
- <SubMenuButton title="계약정보" isSelected={selected === '계약정보'} onClick={() => setSelected('계약정보')}/>
61
- <SubMenuButton title="사건문의" isSelected={selected === '사건문의'} onClick={() => setSelected('사건문의')} outerClassName="!mr-[0px]"/>
62
- </CaseTabSwiper>
63
- </div>
64
- </div>
65
- {selected === '사건 정보' && (<DetailInfo detailList={detailList === null || detailList === void 0 ? void 0 : detailList.data} isLoading={detailListLoading}/>)}
66
- {selected === '사건 타임라인' && (<TimeLine timeLine={timeLine === null || timeLine === void 0 ? void 0 : timeLine.list} isLoading={timeLineLoading}/>)}
67
- {/* {selected === '문서함' && (
68
- <Document
69
- courtFileList={courtFileList?.data as FileList[]}
70
- myFileList={myFileList?.data as FileList[]}
71
- />
72
- )} */}
73
- {selected === '계약정보' && <ContactInfo />}
74
- {selected === '사건문의' && (<CaseInquiry myCaseQuestion={myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.list} id={id} refetch={myCaseQuestionRefetch} pageSize={pageSize} totalLength={(_a = myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.totalLength) !== null && _a !== void 0 ? _a : 0} pageNumber={pageNumber} onChange={() => { }}/>)}
75
- </HeaderLayout>
76
- </div>
77
- </div>);
5
+ return (<Suspense>
6
+ <MyCaseDetailPageContainer jwt={jwt}/>
7
+ </Suspense>);
78
8
  };
79
9
  export default MyCaseDetailPage;
@@ -1,151 +1,13 @@
1
1
  'use client';
2
2
 
3
- import React, { useEffect, useState } from 'react';
4
- import { useTranslation } from 'next-i18next';
5
- import IntroWrapper from '../_component/_layout/IntroWrapper';
6
- import CaseLayout from '../_component/_layout/CaseLayout';
7
- import SubMenuButton from '../_component/_button/SubMenuButton';
8
- import HeaderLayout from '../_component/_layout/HeaderLayout';
9
- import DetailInfo from './_component/DetailInfo';
10
- import { useParams, usePathname, useRouter, useSearchParams } from 'next/navigation';
11
- import { useQuery } from 'react-query';
12
- import getCase from '../_fetchers/getCase';
13
- import { DetailList, FetchType, FileList, Question, TimeLineType } from '../_type/type';
14
- import { actionGetDetailList, actionGetMyCaseQuestion, actionGetTimeLine } from '../_actions/action';
15
- import background from '../../../../asset/images/myCase/background.webp';
16
- import backgroundTb from '../../../../asset/images/myCase/background_tb.webp';
17
- import backgroundMo from '../../../../asset/images/myCase/background_mo.webp';
18
- import TimeLine from './_component/TimeLine';
3
+ import React, { useEffect, useState, Suspense } from 'react';
4
+ import MyCaseDetailPageContainer from './_component/MyCaseDetailPageContainer';
19
5
 
20
- import ContactInfo from './_component/ContactInfo';
21
- import CaseInquiry from './_component/_caseInquiry/CaseInquiry';
22
- import CaseTabSwiper from '../_component/_table/CaseTabSwiper';
23
6
  const MyCaseDetailPage = ({ jwt }: { jwt?: string }) => {
24
- const { t } = useTranslation('common');
25
- const [selected, setSelected] = useState<string>('사건 정보');
26
- const router = useRouter();
27
- const searchParams = useSearchParams();
28
- const params = useParams();
29
- const id = params?.id;
30
-
31
- const { page, tap, subTap } = Object.fromEntries(searchParams.entries());
32
- const pageNumber = page ? Number(page) : 1;
33
- const [pageSize, setPageSize] = useState(3);
34
-
35
- const { data: detailList, isLoading: detailListLoading } = actionGetDetailList(id as string, jwt);
36
- const { data: timeLine, isLoading: timeLineLoading } = actionGetTimeLine(id as string, jwt);
37
- // const { data: courtFileList, isLoading: courtFileListLoading } = actionGetCourtFileList(id as string, jwt);
38
- // const { data: myFileList, isLoading: myFileListLoading } = actionGetMyFileList(id as string, jwt);
39
- const {
40
- data: myCaseQuestion,
41
- isLoading: myCaseQuestionLoading,
42
- refetch: myCaseQuestionRefetch
43
- } = actionGetMyCaseQuestion(id as string, pageNumber, pageSize, jwt);
44
-
45
7
  return (
46
- <div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
47
- <IntroWrapper
48
- title={'상세 사건 정보'}
49
- subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'}
50
- backgroundImage={background}
51
- backgroundTbImage={backgroundTb}
52
- backgroundMoImage={backgroundMo}
53
- outerClassName="h-[300px] sm-top:h-[448px] lg:h-[513px]"
54
- />
55
-
56
- <div className={'relative z-[1] '}>
57
- {/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
58
- <HeaderLayout>
59
- <div className="sm-top:mt-[283px] mt-[210px] lg:mt-[302px] ">
60
- <div className="sm-top:gap-[32px] flex items-center justify-center gap-[16px] max-[415px]:hidden lg:gap-[28px]">
61
- <SubMenuButton
62
- title="사건 정보"
63
- isSelected={selected === '사건 정보'}
64
- onClick={() => setSelected('사건 정보')}
65
- />
66
- <SubMenuButton
67
- title="사건 타임라인"
68
- isSelected={selected === '사건 타임라인'}
69
- onClick={() => setSelected('사건 타임라인')}
70
- />
71
- {/* <SubMenuButton
72
- title="문서함"
73
- isSelected={selected === '문서함'}
74
- onClick={() => setSelected('문서함')}
75
- /> */}
76
- <SubMenuButton
77
- title="계약정보"
78
- isSelected={selected === '계약정보'}
79
- onClick={() => setSelected('계약정보')}
80
- />
81
- <SubMenuButton
82
- title="사건문의"
83
- isSelected={selected === '사건문의'}
84
- onClick={() => setSelected('사건문의')}
85
- />
86
- </div>
87
- <div className="hidden max-[415px]:block 2sm:pl-[40px]">
88
- <CaseTabSwiper id="case-tab-swiper3" scrollClassName="max-[415px]:!block">
89
- <SubMenuButton
90
- title="사건 정보"
91
- isSelected={selected === '사건 정보'}
92
- onClick={() => setSelected('사건 정보')}
93
- outerClassName="ml-[20px]"
94
- />
95
- <SubMenuButton
96
- title="사건 타임라인"
97
- isSelected={selected === '사건 타임라인'}
98
- onClick={() => setSelected('사건 타임라인')}
99
- />
100
- {/* <SubMenuButton
101
- title="문서함"
102
- isSelected={selected === '문서함'}
103
- onClick={() => setSelected('문서함')}
104
- /> */}
105
- <SubMenuButton
106
- title="계약정보"
107
- isSelected={selected === '계약정보'}
108
- onClick={() => setSelected('계약정보')}
109
- />
110
- <SubMenuButton
111
- title="사건문의"
112
- isSelected={selected === '사건문의'}
113
- onClick={() => setSelected('사건문의')}
114
- outerClassName="!mr-[0px]"
115
- />
116
- </CaseTabSwiper>
117
- </div>
118
- </div>
119
- {selected === '사건 정보' && (
120
- <DetailInfo detailList={detailList?.data as DetailList} isLoading={detailListLoading} />
121
- )}
122
- {selected === '사건 타임라인' && (
123
- <TimeLine
124
- timeLine={timeLine?.list as unknown as TimeLineType[][]}
125
- isLoading={timeLineLoading}
126
- />
127
- )}
128
- {/* {selected === '문서함' && (
129
- <Document
130
- courtFileList={courtFileList?.data as FileList[]}
131
- myFileList={myFileList?.data as FileList[]}
132
- />
133
- )} */}
134
- {selected === '계약정보' && <ContactInfo />}
135
- {selected === '사건문의' && (
136
- <CaseInquiry
137
- myCaseQuestion={myCaseQuestion?.list as unknown as Question[]}
138
- id={id as string}
139
- refetch={myCaseQuestionRefetch}
140
- pageSize={pageSize}
141
- totalLength={myCaseQuestion?.totalLength ?? 0}
142
- pageNumber={pageNumber}
143
- onChange={() => {}}
144
- />
145
- )}
146
- </HeaderLayout>
147
- </div>
148
- </div>
8
+ <Suspense>
9
+ <MyCaseDetailPageContainer jwt={jwt} />
10
+ </Suspense>
149
11
  );
150
12
  };
151
13
 
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const MyCaseDetailPageContainer: ({ jwt }: {
3
+ jwt?: string;
4
+ }) => React.JSX.Element;
5
+ export default MyCaseDetailPageContainer;
@@ -0,0 +1,80 @@
1
+ 'use client';
2
+ import React, { useState, Suspense } from 'react';
3
+ // import { useTranslation } from 'next-i18next';
4
+ import IntroWrapper from '../../_component/_layout/IntroWrapper';
5
+ import SubMenuButton from '../../_component/_button/SubMenuButton';
6
+ import HeaderLayout from '../../_component/_layout/HeaderLayout';
7
+ import DetailInfo from './../_component/DetailInfo';
8
+ import { useParams, useRouter, useSearchParams } from 'next/navigation';
9
+ import { actionGetDetailList, actionGetMyCaseQuestion, actionGetTimeLine } from '../../_actions/action';
10
+ import background from '../../../../../asset/images/myCase/background.webp';
11
+ import backgroundTb from '../../../../../asset/images/myCase/background_tb.webp';
12
+ import backgroundMo from '../../../../../asset/images/myCase/background_mo.webp';
13
+ import TimeLine from './../_component/TimeLine';
14
+ import ContactInfo from './../_component/ContactInfo';
15
+ import CaseInquiry from './../_component/_caseInquiry/CaseInquiry';
16
+ import CaseTabSwiper from '../../_component/_table/CaseTabSwiper';
17
+ const MyCaseDetailPageContainer = ({ jwt }) => {
18
+ var _a;
19
+ const [selected, setSelected] = useState('사건 정보');
20
+ const router = useRouter();
21
+ const searchParams = useSearchParams();
22
+ const params = useParams();
23
+ const id = params === null || params === void 0 ? void 0 : params.id;
24
+ const { page, tap, subTap } = Object.fromEntries(searchParams.entries());
25
+ const pageNumber = page ? Number(page) : 1;
26
+ const [pageSize, setPageSize] = useState(3);
27
+ const { data: detailList, isLoading: detailListLoading } = actionGetDetailList(id, jwt);
28
+ const { data: timeLine, isLoading: timeLineLoading } = actionGetTimeLine(id, jwt);
29
+ // const { data: courtFileList, isLoading: courtFileListLoading } = actionGetCourtFileList(id as string, jwt);
30
+ // const { data: myFileList, isLoading: myFileListLoading } = actionGetMyFileList(id as string, jwt);
31
+ const { data: myCaseQuestion, isLoading: myCaseQuestionLoading, refetch: myCaseQuestionRefetch } = actionGetMyCaseQuestion(id, pageNumber, pageSize, jwt);
32
+ return (<Suspense>
33
+ <div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
34
+ <IntroWrapper title={'상세 사건 정보'} subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'} backgroundImage={background} backgroundTbImage={backgroundTb} backgroundMoImage={backgroundMo} outerClassName="h-[300px] sm-top:h-[448px] lg:h-[513px]"/>
35
+
36
+ <div className={'relative z-[1] '}>
37
+ {/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
38
+ <HeaderLayout>
39
+ <div className="sm-top:mt-[283px] mt-[210px] lg:mt-[302px] ">
40
+ <div className="sm-top:gap-[32px] flex items-center justify-center gap-[16px] max-[415px]:hidden lg:gap-[28px]">
41
+ <SubMenuButton title="사건 정보" isSelected={selected === '사건 정보'} onClick={() => setSelected('사건 정보')}/>
42
+ <SubMenuButton title="사건 타임라인" isSelected={selected === '사건 타임라인'} onClick={() => setSelected('사건 타임라인')}/>
43
+ {/* <SubMenuButton
44
+ title="문서함"
45
+ isSelected={selected === '문서함'}
46
+ onClick={() => setSelected('문서함')}
47
+ /> */}
48
+ <SubMenuButton title="계약정보" isSelected={selected === '계약정보'} onClick={() => setSelected('계약정보')}/>
49
+ <SubMenuButton title="사건문의" isSelected={selected === '사건문의'} onClick={() => setSelected('사건문의')}/>
50
+ </div>
51
+ <div className="hidden max-[415px]:block 2sm:pl-[40px]">
52
+ <CaseTabSwiper id="case-tab-swiper3" scrollClassName="max-[415px]:!block">
53
+ <SubMenuButton title="사건 정보" isSelected={selected === '사건 정보'} onClick={() => setSelected('사건 정보')} outerClassName="ml-[20px]"/>
54
+ <SubMenuButton title="사건 타임라인" isSelected={selected === '사건 타임라인'} onClick={() => setSelected('사건 타임라인')}/>
55
+ {/* <SubMenuButton
56
+ title="문서함"
57
+ isSelected={selected === '문서함'}
58
+ onClick={() => setSelected('문서함')}
59
+ /> */}
60
+ <SubMenuButton title="계약정보" isSelected={selected === '계약정보'} onClick={() => setSelected('계약정보')}/>
61
+ <SubMenuButton title="사건문의" isSelected={selected === '사건문의'} onClick={() => setSelected('사건문의')} outerClassName="!mr-[0px]"/>
62
+ </CaseTabSwiper>
63
+ </div>
64
+ </div>
65
+ {selected === '사건 정보' && (<DetailInfo detailList={detailList === null || detailList === void 0 ? void 0 : detailList.data} isLoading={detailListLoading}/>)}
66
+ {selected === '사건 타임라인' && (<TimeLine timeLine={timeLine === null || timeLine === void 0 ? void 0 : timeLine.list} isLoading={timeLineLoading}/>)}
67
+ {/* {selected === '문서함' && (
68
+ <Document
69
+ courtFileList={courtFileList?.data as FileList[]}
70
+ myFileList={myFileList?.data as FileList[]}
71
+ />
72
+ )} */}
73
+ {selected === '계약정보' && <ContactInfo />}
74
+ {selected === '사건문의' && (<CaseInquiry myCaseQuestion={myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.list} id={id} refetch={myCaseQuestionRefetch} pageSize={pageSize} totalLength={(_a = myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.totalLength) !== null && _a !== void 0 ? _a : 0} pageNumber={pageNumber} onChange={() => { }}/>)}
75
+ </HeaderLayout>
76
+ </div>
77
+ </div>
78
+ </Suspense>);
79
+ };
80
+ export default MyCaseDetailPageContainer;
@@ -0,0 +1,153 @@
1
+ 'use client';
2
+
3
+ import React, { useEffect, useState, Suspense } from 'react';
4
+ // import { useTranslation } from 'next-i18next';
5
+ import IntroWrapper from '../../_component/_layout/IntroWrapper';
6
+ import CaseLayout from '../../_component/_layout/CaseLayout';
7
+ import SubMenuButton from '../../_component/_button/SubMenuButton';
8
+ import HeaderLayout from '../../_component/_layout/HeaderLayout';
9
+ import DetailInfo from './../_component/DetailInfo';
10
+ import { useParams, usePathname, useRouter, useSearchParams } from 'next/navigation';
11
+ import { useQuery } from 'react-query';
12
+ import getCase from '../../_fetchers/getCase';
13
+ import { DetailList, FetchType, FileList, Question, TimeLineType } from '../../_type/type';
14
+ import { actionGetDetailList, actionGetMyCaseQuestion, actionGetTimeLine } from '../../_actions/action';
15
+ import background from '../../../../../asset/images/myCase/background.webp';
16
+ import backgroundTb from '../../../../../asset/images/myCase/background_tb.webp';
17
+ import backgroundMo from '../../../../../asset/images/myCase/background_mo.webp';
18
+ import TimeLine from './../_component/TimeLine';
19
+
20
+ import ContactInfo from './../_component/ContactInfo';
21
+ import CaseInquiry from './../_component/_caseInquiry/CaseInquiry';
22
+ import CaseTabSwiper from '../../_component/_table/CaseTabSwiper';
23
+ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
24
+ const [selected, setSelected] = useState<string>('사건 정보');
25
+ const router = useRouter();
26
+ const searchParams = useSearchParams();
27
+ const params = useParams();
28
+ const id = params?.id;
29
+
30
+ const { page, tap, subTap } = Object.fromEntries(searchParams.entries());
31
+ const pageNumber = page ? Number(page) : 1;
32
+ const [pageSize, setPageSize] = useState(3);
33
+
34
+ const { data: detailList, isLoading: detailListLoading } = actionGetDetailList(id as string, jwt);
35
+ const { data: timeLine, isLoading: timeLineLoading } = actionGetTimeLine(id as string, jwt);
36
+ // const { data: courtFileList, isLoading: courtFileListLoading } = actionGetCourtFileList(id as string, jwt);
37
+ // const { data: myFileList, isLoading: myFileListLoading } = actionGetMyFileList(id as string, jwt);
38
+ const {
39
+ data: myCaseQuestion,
40
+ isLoading: myCaseQuestionLoading,
41
+ refetch: myCaseQuestionRefetch
42
+ } = actionGetMyCaseQuestion(id as string, pageNumber, pageSize, jwt);
43
+
44
+ return (
45
+ <Suspense>
46
+ <div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
47
+ <IntroWrapper
48
+ title={'상세 사건 정보'}
49
+ subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'}
50
+ backgroundImage={background}
51
+ backgroundTbImage={backgroundTb}
52
+ backgroundMoImage={backgroundMo}
53
+ outerClassName="h-[300px] sm-top:h-[448px] lg:h-[513px]"
54
+ />
55
+
56
+ <div className={'relative z-[1] '}>
57
+ {/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
58
+ <HeaderLayout>
59
+ <div className="sm-top:mt-[283px] mt-[210px] lg:mt-[302px] ">
60
+ <div className="sm-top:gap-[32px] flex items-center justify-center gap-[16px] max-[415px]:hidden lg:gap-[28px]">
61
+ <SubMenuButton
62
+ title="사건 정보"
63
+ isSelected={selected === '사건 정보'}
64
+ onClick={() => setSelected('사건 정보')}
65
+ />
66
+ <SubMenuButton
67
+ title="사건 타임라인"
68
+ isSelected={selected === '사건 타임라인'}
69
+ onClick={() => setSelected('사건 타임라인')}
70
+ />
71
+ {/* <SubMenuButton
72
+ title="문서함"
73
+ isSelected={selected === '문서함'}
74
+ onClick={() => setSelected('문서함')}
75
+ /> */}
76
+ <SubMenuButton
77
+ title="계약정보"
78
+ isSelected={selected === '계약정보'}
79
+ onClick={() => setSelected('계약정보')}
80
+ />
81
+ <SubMenuButton
82
+ title="사건문의"
83
+ isSelected={selected === '사건문의'}
84
+ onClick={() => setSelected('사건문의')}
85
+ />
86
+ </div>
87
+ <div className="hidden max-[415px]:block 2sm:pl-[40px]">
88
+ <CaseTabSwiper id="case-tab-swiper3" scrollClassName="max-[415px]:!block">
89
+ <SubMenuButton
90
+ title="사건 정보"
91
+ isSelected={selected === '사건 정보'}
92
+ onClick={() => setSelected('사건 정보')}
93
+ outerClassName="ml-[20px]"
94
+ />
95
+ <SubMenuButton
96
+ title="사건 타임라인"
97
+ isSelected={selected === '사건 타임라인'}
98
+ onClick={() => setSelected('사건 타임라인')}
99
+ />
100
+ {/* <SubMenuButton
101
+ title="문서함"
102
+ isSelected={selected === '문서함'}
103
+ onClick={() => setSelected('문서함')}
104
+ /> */}
105
+ <SubMenuButton
106
+ title="계약정보"
107
+ isSelected={selected === '계약정보'}
108
+ onClick={() => setSelected('계약정보')}
109
+ />
110
+ <SubMenuButton
111
+ title="사건문의"
112
+ isSelected={selected === '사건문의'}
113
+ onClick={() => setSelected('사건문의')}
114
+ outerClassName="!mr-[0px]"
115
+ />
116
+ </CaseTabSwiper>
117
+ </div>
118
+ </div>
119
+ {selected === '사건 정보' && (
120
+ <DetailInfo detailList={detailList?.data as DetailList} isLoading={detailListLoading} />
121
+ )}
122
+ {selected === '사건 타임라인' && (
123
+ <TimeLine
124
+ timeLine={timeLine?.list as unknown as TimeLineType[][]}
125
+ isLoading={timeLineLoading}
126
+ />
127
+ )}
128
+ {/* {selected === '문서함' && (
129
+ <Document
130
+ courtFileList={courtFileList?.data as FileList[]}
131
+ myFileList={myFileList?.data as FileList[]}
132
+ />
133
+ )} */}
134
+ {selected === '계약정보' && <ContactInfo />}
135
+ {selected === '사건문의' && (
136
+ <CaseInquiry
137
+ myCaseQuestion={myCaseQuestion?.list as unknown as Question[]}
138
+ id={id as string}
139
+ refetch={myCaseQuestionRefetch}
140
+ pageSize={pageSize}
141
+ totalLength={myCaseQuestion?.totalLength ?? 0}
142
+ pageNumber={pageNumber}
143
+ onChange={() => {}}
144
+ />
145
+ )}
146
+ </HeaderLayout>
147
+ </div>
148
+ </div>
149
+ </Suspense>
150
+ );
151
+ };
152
+
153
+ export default MyCaseDetailPageContainer;
@@ -1,6 +1,6 @@
1
1
  import Image from 'next/image';
2
2
  import CaseLayout from '../../../_component/_layout/CaseLayout';
3
- import { useRef, useState } from 'react';
3
+ import { useRef, useState, Suspense } from 'react';
4
4
  import CaseInquiryAddModal from '../_modal/CaseInquiryAddModal';
5
5
  import EmptyTable from '../../../_component/_empty/EmptyTable';
6
6
  import dayjs from 'dayjs';
@@ -78,7 +78,9 @@ const CaseInquiry = ({ myCaseQuestion, id, refetch, pageSize, totalLength, pageN
78
78
  </button>
79
79
  </div>
80
80
  <CaseInquiryAddModal isOpen={isOpen} onClose={() => setIsOpen(false)} id={id} refetch={refetch}/>
81
- <PaginationComponent pageSize={pageSize} total={totalLength} onChange={onChange} current={pageNumber}/>
81
+ <Suspense>
82
+ <PaginationComponent pageSize={pageSize} total={totalLength} onChange={onChange} current={pageNumber}/>
83
+ </Suspense>
82
84
  </CaseLayout>);
83
85
  };
84
86
  export default CaseInquiry;
@@ -1,7 +1,7 @@
1
1
  import Image from 'next/image';
2
2
  import CaseLayout from '../../../_component/_layout/CaseLayout';
3
3
  import { Question } from '../../../_type/type';
4
- import { useEffect, useRef, useState } from 'react';
4
+ import { useEffect, useRef, useState, Suspense } from 'react';
5
5
  import CaseInquiryAddModal from '../_modal/CaseInquiryAddModal';
6
6
  import EmptyTable from '../../../_component/_empty/EmptyTable';
7
7
  import dayjs from 'dayjs';
@@ -183,7 +183,9 @@ const CaseInquiry = ({
183
183
  </button>
184
184
  </div>
185
185
  <CaseInquiryAddModal isOpen={isOpen} onClose={() => setIsOpen(false)} id={id} refetch={refetch} />
186
- <PaginationComponent pageSize={pageSize} total={totalLength} onChange={onChange} current={pageNumber} />
186
+ <Suspense>
187
+ <PaginationComponent pageSize={pageSize} total={totalLength} onChange={onChange} current={pageNumber} />
188
+ </Suspense>
187
189
  </CaseLayout>
188
190
  );
189
191
  };