@daeryun/dr_components 1.0.80 → 1.0.81
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/Seo/SeoConsulting.jsx +2 -2
- package/dist/components/Seo/SeoConsulting.tsx +2 -2
- package/dist/components/common/integrate/index.d.ts +1 -1
- package/dist/components/common/types/strength_new/index.d.ts +3 -0
- package/dist/components/common/types/strength_new/index.ts +3 -0
- package/dist/components/page/Choice/Choice.jsx +9 -4
- package/dist/components/page/Choice/Choice.tsx +9 -4
- package/dist/components/page/Integrate/Broadcast.jsx +6 -10
- package/dist/components/page/Integrate/Broadcast.tsx +6 -11
- package/dist/components/page/Integrate/Field.jsx +7 -11
- package/dist/components/page/Integrate/Field.tsx +7 -12
- package/dist/components/page/Integrate/LawInfo.jsx +6 -10
- package/dist/components/page/Integrate/LawInfo.tsx +6 -11
- package/dist/components/page/Integrate/Lawyer.jsx +6 -10
- package/dist/components/page/Integrate/Lawyer.tsx +6 -11
- package/dist/components/page/Integrate/Map.jsx +3 -7
- package/dist/components/page/Integrate/Map.tsx +3 -8
- package/dist/components/page/Integrate/Reply.jsx +6 -10
- package/dist/components/page/Integrate/Reply.tsx +7 -11
- package/dist/components/page/Integrate/Success.jsx +6 -10
- package/dist/components/page/Integrate/Success.tsx +6 -11
- package/dist/components/page/Integrate/Title.jsx +28 -12
- package/dist/components/page/Integrate/Title.tsx +28 -28
- package/dist/components/page/StrengthNew/StrengthNew.jsx +2 -0
- package/dist/components/page/StrengthNew/StrengthNew.tsx +6 -0
- package/dist/components/page/StrengthNew/components/common/LawyerSection.jsx +1 -2
- package/dist/components/page/StrengthNew/components/common/LawyerSection.tsx +8 -2
- package/dist/styles/globals.css +394 -366
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ const Field = (props) => {
|
|
|
10
10
|
const [allTabPage, setAllTabPage] = useState(0);
|
|
11
11
|
const [allTabList, setAllTabList] = useState([]);
|
|
12
12
|
const getAllPage = () => {
|
|
13
|
-
const itemsToAdd =
|
|
14
|
-
const startIndex =
|
|
13
|
+
const itemsToAdd = 12;
|
|
14
|
+
const startIndex = allTabList.length;
|
|
15
15
|
const endIndex = startIndex + itemsToAdd;
|
|
16
16
|
const newItems = list.fieldList.slice(startIndex, endIndex);
|
|
17
17
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -25,20 +25,16 @@ const Field = (props) => {
|
|
|
25
25
|
setAllTabPage(allTabPage + 1);
|
|
26
26
|
};
|
|
27
27
|
useEffect(() => {
|
|
28
|
-
if (allTabList.length
|
|
29
|
-
setAllTabList(list.fieldList.slice(0, 10));
|
|
28
|
+
if (allTabList.length <= 10) {
|
|
29
|
+
setAllTabList(list.fieldList.slice(0, isMobileSize ? 10 : 6));
|
|
30
30
|
}
|
|
31
|
-
}, [list.fieldList]);
|
|
31
|
+
}, [list.fieldList, isMobileSize]);
|
|
32
32
|
return (<>
|
|
33
33
|
{tab === '전체' || tab === 'field' ? (tab === 'field' && listCount.field < 1 ? (<NoResult />) : (<>
|
|
34
34
|
{listCount.field > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
35
35
|
<Title title={'업무분야'} tab={tab} type={'field'} onClick={str => onMoreViewText(str)} count={listCount.field}/>
|
|
36
36
|
<div className={'my-4 grid gap-[16px] sm:m-2 sm:grid-cols-2 lg:grid-cols-3'}>
|
|
37
|
-
{(tab === '전체'
|
|
38
|
-
? isMobileSize === true
|
|
39
|
-
? allTabList
|
|
40
|
-
: list.fieldList.slice(0, 6)
|
|
41
|
-
: list.fieldList).map((item, index) => {
|
|
37
|
+
{(tab === '전체' ? allTabList : list.fieldList).map((item, index) => {
|
|
42
38
|
return (<Link href={`${item.pathname}field_new/[idx]`} target={item.center_code === props.center_code ? '' : '_blank'} as={`${item.pathname}field_new/${item.idx}`} key={`${item.pathname}field_new/[${item.idx}] `}>
|
|
43
39
|
<p className={'text-[20px] text-[#555555] max-xl:text-[18px] max-sm:text-[16px] max-xs:text-[15px]'}>
|
|
44
40
|
<span className={'mr-2 text-[#99999]'}>•</span>
|
|
@@ -54,7 +50,7 @@ const Field = (props) => {
|
|
|
54
50
|
onMoreView();
|
|
55
51
|
setLoading(false);
|
|
56
52
|
}}/>)}
|
|
57
|
-
{tab === '전체' &&
|
|
53
|
+
{tab === '전체' && (<ViewMore flag={allTabList.length != listCount.field} func={() => {
|
|
58
54
|
getAllPage();
|
|
59
55
|
}}/>)}
|
|
60
56
|
</div>) : (<></>)}
|
|
@@ -32,9 +32,9 @@ const Field = (props: {
|
|
|
32
32
|
const [allTabList, setAllTabList] = useState<IFieldTypes[]>([]);
|
|
33
33
|
|
|
34
34
|
const getAllPage = () => {
|
|
35
|
-
const itemsToAdd =
|
|
35
|
+
const itemsToAdd = 12;
|
|
36
36
|
|
|
37
|
-
const startIndex =
|
|
37
|
+
const startIndex = allTabList.length;
|
|
38
38
|
const endIndex = startIndex + itemsToAdd;
|
|
39
39
|
const newItems = list.fieldList.slice(startIndex, endIndex);
|
|
40
40
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -52,10 +52,10 @@ const Field = (props: {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
useEffect(() => {
|
|
55
|
-
if (allTabList.length
|
|
56
|
-
setAllTabList(list.fieldList.slice(0, 10));
|
|
55
|
+
if (allTabList.length <= 10) {
|
|
56
|
+
setAllTabList(list.fieldList.slice(0, isMobileSize ? 10 : 6));
|
|
57
57
|
}
|
|
58
|
-
}, [list.fieldList]);
|
|
58
|
+
}, [list.fieldList, isMobileSize]);
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<>
|
|
@@ -74,12 +74,7 @@ const Field = (props: {
|
|
|
74
74
|
count={listCount.field}
|
|
75
75
|
/>
|
|
76
76
|
<div className={'my-4 grid gap-[16px] sm:m-2 sm:grid-cols-2 lg:grid-cols-3'}>
|
|
77
|
-
{(tab === '전체'
|
|
78
|
-
? isMobileSize === true
|
|
79
|
-
? allTabList
|
|
80
|
-
: list.fieldList.slice(0, 6)
|
|
81
|
-
: list.fieldList
|
|
82
|
-
).map((item, index) => {
|
|
77
|
+
{(tab === '전체' ? allTabList : list.fieldList).map((item, index) => {
|
|
83
78
|
return (
|
|
84
79
|
<Link
|
|
85
80
|
href={`${item.pathname}field_new/[idx]`}
|
|
@@ -114,7 +109,7 @@ const Field = (props: {
|
|
|
114
109
|
}}
|
|
115
110
|
/>
|
|
116
111
|
)}
|
|
117
|
-
{tab === '전체' &&
|
|
112
|
+
{tab === '전체' && (
|
|
118
113
|
<ViewMore
|
|
119
114
|
flag={allTabList.length != listCount.field}
|
|
120
115
|
func={() => {
|
|
@@ -13,7 +13,7 @@ const LawInfo = (props) => {
|
|
|
13
13
|
const getAllPage = () => {
|
|
14
14
|
const itemsToAdd = 4;
|
|
15
15
|
// infoList에서 잘라낼 시작 인덱스 계산
|
|
16
|
-
const startIndex =
|
|
16
|
+
const startIndex = allTabList.length;
|
|
17
17
|
const endIndex = startIndex + itemsToAdd;
|
|
18
18
|
const newItems = list.infoList.slice(startIndex, endIndex);
|
|
19
19
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -31,20 +31,16 @@ const LawInfo = (props) => {
|
|
|
31
31
|
setAllTabPage(allTabPage + 1);
|
|
32
32
|
};
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
if (allTabList.length
|
|
35
|
-
setAllTabList(list.infoList.slice(0, 2));
|
|
34
|
+
if (allTabList.length <= 4) {
|
|
35
|
+
setAllTabList(list.infoList.slice(0, isMobileSize ? 2 : 4));
|
|
36
36
|
}
|
|
37
|
-
}, [list.infoList]);
|
|
37
|
+
}, [list.infoList, isMobileSize]);
|
|
38
38
|
return (<>
|
|
39
39
|
{tab === '전체' || tab === 'info' ? (tab === 'info' && listCount.info < 1 ? (<NoResult />) : (<>
|
|
40
40
|
{listCount.info > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
41
41
|
<Title title={'법률정보'} tab={tab} type={'info'} onClick={str => onMoreViewText(str)} count={listCount.info}/>
|
|
42
42
|
<div className={'grid w-full gap-[40px] sm:grid-cols-2 sm:gap-[30px] lg:grid-cols-4 lg:gap-[16px]'}>
|
|
43
|
-
{(tab === '전체'
|
|
44
|
-
? isMobileSize === true
|
|
45
|
-
? allTabList
|
|
46
|
-
: list.infoList.slice(0, 4)
|
|
47
|
-
: list.infoList).map((item, index) => {
|
|
43
|
+
{(tab === '전체' ? allTabList : list.infoList).map((item, index) => {
|
|
48
44
|
return (<Link key={item.pathname + 'lawinfo_new/' + item.idx} href={item.pathname + 'lawinfo_new/' + item.idx} target={item.center_code === props.center_code ? '' : '_blank'} className={'mb-3 flex flex-col gap-3 overflow-hidden'}>
|
|
49
45
|
<div className={'relative aspect-[1.47] w-full overflow-hidden max-sm:h-full max-sm:w-full'}>
|
|
50
46
|
<Image src={'https://d1tgonli21s4df.cloudfront.net' + item.img} alt={item.alt} fill sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw" className={'h-full w-full object-contain '}/>
|
|
@@ -60,7 +56,7 @@ const LawInfo = (props) => {
|
|
|
60
56
|
onMoreView();
|
|
61
57
|
setLoading(false);
|
|
62
58
|
}}/>)}
|
|
63
|
-
{tab === '전체' &&
|
|
59
|
+
{tab === '전체' && (<ViewMore flag={allTabList.length != listCount.info} func={() => {
|
|
64
60
|
getAllPage();
|
|
65
61
|
}}/>)}
|
|
66
62
|
</div>) : (<></>)}
|
|
@@ -35,7 +35,7 @@ const LawInfo = (props: {
|
|
|
35
35
|
const itemsToAdd = 4;
|
|
36
36
|
|
|
37
37
|
// infoList에서 잘라낼 시작 인덱스 계산
|
|
38
|
-
const startIndex =
|
|
38
|
+
const startIndex = allTabList.length;
|
|
39
39
|
const endIndex = startIndex + itemsToAdd;
|
|
40
40
|
const newItems = list.infoList.slice(startIndex, endIndex);
|
|
41
41
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -57,10 +57,10 @@ const LawInfo = (props: {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
useEffect(() => {
|
|
60
|
-
if (allTabList.length
|
|
61
|
-
setAllTabList(list.infoList.slice(0, 2));
|
|
60
|
+
if (allTabList.length <= 4) {
|
|
61
|
+
setAllTabList(list.infoList.slice(0, isMobileSize ? 2 : 4));
|
|
62
62
|
}
|
|
63
|
-
}, [list.infoList]);
|
|
63
|
+
}, [list.infoList, isMobileSize]);
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<>
|
|
@@ -83,12 +83,7 @@ const LawInfo = (props: {
|
|
|
83
83
|
'grid w-full gap-[40px] sm:grid-cols-2 sm:gap-[30px] lg:grid-cols-4 lg:gap-[16px]'
|
|
84
84
|
}
|
|
85
85
|
>
|
|
86
|
-
{(tab === '전체'
|
|
87
|
-
? isMobileSize === true
|
|
88
|
-
? allTabList
|
|
89
|
-
: list.infoList.slice(0, 4)
|
|
90
|
-
: list.infoList
|
|
91
|
-
).map((item, index) => {
|
|
86
|
+
{(tab === '전체' ? allTabList : list.infoList).map((item, index) => {
|
|
92
87
|
return (
|
|
93
88
|
<Link
|
|
94
89
|
key={item.pathname + 'lawinfo_new/' + item.idx}
|
|
@@ -133,7 +128,7 @@ const LawInfo = (props: {
|
|
|
133
128
|
}}
|
|
134
129
|
/>
|
|
135
130
|
)}
|
|
136
|
-
{tab === '전체' &&
|
|
131
|
+
{tab === '전체' && (
|
|
137
132
|
<ViewMore
|
|
138
133
|
flag={allTabList.length != listCount.info}
|
|
139
134
|
func={() => {
|
|
@@ -22,7 +22,7 @@ const Lawyer = (props) => {
|
|
|
22
22
|
const getAllPage = () => {
|
|
23
23
|
const itemsToAdd = 6;
|
|
24
24
|
// lawyerList에서 잘라낼 시작 인덱스 계산
|
|
25
|
-
const startIndex =
|
|
25
|
+
const startIndex = allTabList.length;
|
|
26
26
|
const endIndex = startIndex + itemsToAdd;
|
|
27
27
|
const newItems = list.lawyerList.slice(startIndex, endIndex);
|
|
28
28
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -40,10 +40,10 @@ const Lawyer = (props) => {
|
|
|
40
40
|
setAllTabPage(allTabPage + 1);
|
|
41
41
|
};
|
|
42
42
|
useEffect(() => {
|
|
43
|
-
if (allTabList.length
|
|
44
|
-
setAllTabList(list.lawyerList.slice(0, 6));
|
|
43
|
+
if (allTabList.length <= 8) {
|
|
44
|
+
setAllTabList(list.lawyerList.slice(0, isMobileSize ? 6 : 8));
|
|
45
45
|
}
|
|
46
|
-
}, [list.lawyerList]);
|
|
46
|
+
}, [list.lawyerList, isMobileSize]);
|
|
47
47
|
return props.tab === '전체' || props.tab === 'lawyer' ? (
|
|
48
48
|
//구성원 탭에서는 결과 없음
|
|
49
49
|
tab === 'lawyer' && listCount.lawyer < 1 ? (<NoResult />) : (<>
|
|
@@ -52,11 +52,7 @@ const Lawyer = (props) => {
|
|
|
52
52
|
<Title title={'구성원'} tab={tab} type={'lawyer'} onClick={str => onMoreViewText(str)} count={listCount.lawyer}/>
|
|
53
53
|
|
|
54
54
|
<div className={'mx-auto my-16 grid w-full grid-cols-2 gap-y-5 max-md:gap-y-2 md:grid-cols-3 xl:grid-cols-4'}>
|
|
55
|
-
{(tab === '전체'
|
|
56
|
-
? isMobileSize === true
|
|
57
|
-
? allTabList
|
|
58
|
-
: list.lawyerList.slice(0, 8)
|
|
59
|
-
: list.lawyerList).map((item, index) => {
|
|
55
|
+
{(tab === '전체' ? allTabList : list.lawyerList).map((item, index) => {
|
|
60
56
|
return (<IntegrateLawyer key={item.id} center_code={props.center_code} item={item} lawyerImagePath={lawyerImagePath}/>);
|
|
61
57
|
})}
|
|
62
58
|
</div>
|
|
@@ -65,7 +61,7 @@ const Lawyer = (props) => {
|
|
|
65
61
|
props.onMoreView();
|
|
66
62
|
setLoading(false);
|
|
67
63
|
}} loading={loading} totalPage={Math.ceil(listCount.lawyer / 12)} nowPage={pages.lawyerList}/>)}
|
|
68
|
-
{tab === '전체' &&
|
|
64
|
+
{tab === '전체' && (<ViewMore flag={allTabList.length != listCount.lawyer} func={() => {
|
|
69
65
|
getAllPage();
|
|
70
66
|
}}/>)}
|
|
71
67
|
</div>) : (<></>)}
|
|
@@ -47,7 +47,7 @@ const Lawyer = (props: {
|
|
|
47
47
|
const itemsToAdd = 6;
|
|
48
48
|
|
|
49
49
|
// lawyerList에서 잘라낼 시작 인덱스 계산
|
|
50
|
-
const startIndex =
|
|
50
|
+
const startIndex = allTabList.length;
|
|
51
51
|
const endIndex = startIndex + itemsToAdd;
|
|
52
52
|
const newItems = list.lawyerList.slice(startIndex, endIndex);
|
|
53
53
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -69,10 +69,10 @@ const Lawyer = (props: {
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
useEffect(() => {
|
|
72
|
-
if (allTabList.length
|
|
73
|
-
setAllTabList(list.lawyerList.slice(0, 6));
|
|
72
|
+
if (allTabList.length <= 8) {
|
|
73
|
+
setAllTabList(list.lawyerList.slice(0, isMobileSize ? 6 : 8));
|
|
74
74
|
}
|
|
75
|
-
}, [list.lawyerList]);
|
|
75
|
+
}, [list.lawyerList, isMobileSize]);
|
|
76
76
|
|
|
77
77
|
return props.tab === '전체' || props.tab === 'lawyer' ? (
|
|
78
78
|
//구성원 탭에서는 결과 없음
|
|
@@ -96,12 +96,7 @@ const Lawyer = (props: {
|
|
|
96
96
|
'mx-auto my-16 grid w-full grid-cols-2 gap-y-5 max-md:gap-y-2 md:grid-cols-3 xl:grid-cols-4'
|
|
97
97
|
}
|
|
98
98
|
>
|
|
99
|
-
{(tab === '전체'
|
|
100
|
-
? isMobileSize === true
|
|
101
|
-
? allTabList
|
|
102
|
-
: list.lawyerList.slice(0, 8)
|
|
103
|
-
: list.lawyerList
|
|
104
|
-
).map((item, index: number) => {
|
|
99
|
+
{(tab === '전체' ? allTabList : list.lawyerList).map((item, index: number) => {
|
|
105
100
|
return (
|
|
106
101
|
<IntegrateLawyer
|
|
107
102
|
key={item.id}
|
|
@@ -125,7 +120,7 @@ const Lawyer = (props: {
|
|
|
125
120
|
nowPage={pages.lawyerList}
|
|
126
121
|
/>
|
|
127
122
|
)}
|
|
128
|
-
{tab === '전체' &&
|
|
123
|
+
{tab === '전체' && (
|
|
129
124
|
<ViewMore
|
|
130
125
|
flag={allTabList.length != listCount.lawyer}
|
|
131
126
|
func={() => {
|
|
@@ -14,7 +14,7 @@ const Map = (props) => {
|
|
|
14
14
|
const getAllPage = () => {
|
|
15
15
|
const itemsToAdd = 5;
|
|
16
16
|
// imapList에서 잘라낼 시작 인덱스 계산
|
|
17
|
-
const startIndex =
|
|
17
|
+
const startIndex = allTabList.length;
|
|
18
18
|
const endIndex = startIndex + itemsToAdd;
|
|
19
19
|
const newItems = list.mapList.slice(startIndex, endIndex);
|
|
20
20
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -43,11 +43,7 @@ const Map = (props) => {
|
|
|
43
43
|
{props.listCount.map > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
44
44
|
<Title title={'오시는길'} tab={tab} type={'map'} count={props.listCount.map} onClick={str => onMoreViewText(str)}/>
|
|
45
45
|
<div className={'mt-[-1.5rem] w-full'}>
|
|
46
|
-
{(tab === '전체'
|
|
47
|
-
? isMobileSize === true
|
|
48
|
-
? allTabList
|
|
49
|
-
: list.mapList.slice(0, 5)
|
|
50
|
-
: list.mapList).map((item, index) => {
|
|
46
|
+
{(tab === '전체' ? allTabList : list.mapList).map((item, index) => {
|
|
51
47
|
return (<div key={'integrate_map' + item.key} className={'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
|
|
52
48
|
//1280px
|
|
53
49
|
'max-xl:gap-[0] ' +
|
|
@@ -114,7 +110,7 @@ const Map = (props) => {
|
|
|
114
110
|
props.onMoreView();
|
|
115
111
|
setLoading(false);
|
|
116
112
|
}} loading={loading} totalPage={Math.ceil(props.listCount.map / 12)} nowPage={pages.mapList}/>)}
|
|
117
|
-
{tab === '전체' &&
|
|
113
|
+
{tab === '전체' && (<ViewMore flag={allTabList.length != props.listCount.map} func={() => {
|
|
118
114
|
getAllPage();
|
|
119
115
|
}}/>)}
|
|
120
116
|
</div>) : (<></>)}
|
|
@@ -36,7 +36,7 @@ const Map = (props: {
|
|
|
36
36
|
const itemsToAdd = 5;
|
|
37
37
|
|
|
38
38
|
// imapList에서 잘라낼 시작 인덱스 계산
|
|
39
|
-
const startIndex =
|
|
39
|
+
const startIndex = allTabList.length;
|
|
40
40
|
const endIndex = startIndex + itemsToAdd;
|
|
41
41
|
const newItems = list.mapList.slice(startIndex, endIndex);
|
|
42
42
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -80,12 +80,7 @@ const Map = (props: {
|
|
|
80
80
|
onClick={str => onMoreViewText(str)}
|
|
81
81
|
/>
|
|
82
82
|
<div className={'mt-[-1.5rem] w-full'}>
|
|
83
|
-
{(tab === '전체'
|
|
84
|
-
? isMobileSize === true
|
|
85
|
-
? allTabList
|
|
86
|
-
: list.mapList.slice(0, 5)
|
|
87
|
-
: list.mapList
|
|
88
|
-
).map((item, index: number) => {
|
|
83
|
+
{(tab === '전체' ? allTabList : list.mapList).map((item, index: number) => {
|
|
89
84
|
return (
|
|
90
85
|
<div
|
|
91
86
|
key={'integrate_map' + item.key}
|
|
@@ -219,7 +214,7 @@ const Map = (props: {
|
|
|
219
214
|
nowPage={pages.mapList}
|
|
220
215
|
/>
|
|
221
216
|
)}
|
|
222
|
-
{tab === '전체' &&
|
|
217
|
+
{tab === '전체' && (
|
|
223
218
|
<ViewMore
|
|
224
219
|
flag={allTabList.length != props.listCount.map}
|
|
225
220
|
func={() => {
|
|
@@ -13,7 +13,7 @@ const Reply = (props) => {
|
|
|
13
13
|
const getAllPage = () => {
|
|
14
14
|
const itemsToAdd = 4;
|
|
15
15
|
// replyList에서 잘라낼 시작 인덱스 계산
|
|
16
|
-
const startIndex =
|
|
16
|
+
const startIndex = allTabList.length;
|
|
17
17
|
const endIndex = startIndex + itemsToAdd;
|
|
18
18
|
const newItems = list.replyList.slice(startIndex, endIndex);
|
|
19
19
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -31,20 +31,16 @@ const Reply = (props) => {
|
|
|
31
31
|
setAllTabPage(allTabPage + 1);
|
|
32
32
|
};
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
if (allTabList.length
|
|
35
|
-
setAllTabList(list.replyList.slice(0, 2));
|
|
34
|
+
if (allTabList.length <= 4) {
|
|
35
|
+
setAllTabList(list.replyList.slice(0, isMobileSize ? 2 : 4));
|
|
36
36
|
}
|
|
37
|
-
}, [list.replyList]);
|
|
37
|
+
}, [list.replyList, isMobileSize]);
|
|
38
38
|
return (<>
|
|
39
39
|
{tab === '전체' || tab === 'reply' ? (tab === 'reply' && listCount.reply < 1 ? (<NoResult />) : (<>
|
|
40
40
|
{listCount.reply > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
41
41
|
<Title title={'고객후기'} tab={tab} type={'reply'} onClick={str => onMoreViewText(str)} count={listCount.reply}/>
|
|
42
42
|
<div className={'mb-9 mt-8 grid gap-[18px] sm:grid-cols-2'}>
|
|
43
|
-
{(tab === '전체'
|
|
44
|
-
? isMobileSize === true
|
|
45
|
-
? allTabList
|
|
46
|
-
: list.replyList.slice(0, 4)
|
|
47
|
-
: list.replyList).map((item, index) => {
|
|
43
|
+
{(tab === '전체' ? allTabList : list.replyList).map((item, index) => {
|
|
48
44
|
return (<div key={'reply' + item.id} className={'h-[280px] border-[5px] border-solid border-[#EAEAEA] p-7 max-xs:h-[190px] max-xs:p-4 sm:p-8 '}>
|
|
49
45
|
<Link href={(item.crime_code != props.crime_code
|
|
50
46
|
? 'https://www.daeryunlaw.com'
|
|
@@ -78,7 +74,7 @@ const Reply = (props) => {
|
|
|
78
74
|
onMoreView();
|
|
79
75
|
setLoading(false);
|
|
80
76
|
}}/>)}{' '}
|
|
81
|
-
{tab === '전체' &&
|
|
77
|
+
{tab === '전체' && (<ViewMore loading={loading} flag={allTabList.length != listCount.reply} func={() => {
|
|
82
78
|
getAllPage();
|
|
83
79
|
}}/>)}
|
|
84
80
|
</div>) : (<></>)}
|
|
@@ -37,7 +37,7 @@ const Reply = (props: {
|
|
|
37
37
|
const itemsToAdd = 4;
|
|
38
38
|
|
|
39
39
|
// replyList에서 잘라낼 시작 인덱스 계산
|
|
40
|
-
const startIndex =
|
|
40
|
+
const startIndex = allTabList.length;
|
|
41
41
|
const endIndex = startIndex + itemsToAdd;
|
|
42
42
|
const newItems = list.replyList.slice(startIndex, endIndex);
|
|
43
43
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -59,10 +59,11 @@ const Reply = (props: {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
useEffect(() => {
|
|
62
|
-
if (allTabList.length
|
|
63
|
-
setAllTabList(list.replyList.slice(0, 2));
|
|
62
|
+
if (allTabList.length <= 4) {
|
|
63
|
+
setAllTabList(list.replyList.slice(0, isMobileSize ? 2 : 4));
|
|
64
64
|
}
|
|
65
|
-
}, [list.replyList]);
|
|
65
|
+
}, [list.replyList, isMobileSize]);
|
|
66
|
+
|
|
66
67
|
return (
|
|
67
68
|
<>
|
|
68
69
|
{tab === '전체' || tab === 'reply' ? (
|
|
@@ -80,12 +81,7 @@ const Reply = (props: {
|
|
|
80
81
|
count={listCount.reply}
|
|
81
82
|
/>
|
|
82
83
|
<div className={'mb-9 mt-8 grid gap-[18px] sm:grid-cols-2'}>
|
|
83
|
-
{(tab === '전체'
|
|
84
|
-
? isMobileSize === true
|
|
85
|
-
? allTabList
|
|
86
|
-
: list.replyList.slice(0, 4)
|
|
87
|
-
: list.replyList
|
|
88
|
-
).map((item, index) => {
|
|
84
|
+
{(tab === '전체' ? allTabList : list.replyList).map((item, index) => {
|
|
89
85
|
return (
|
|
90
86
|
<div
|
|
91
87
|
key={'reply' + item.id}
|
|
@@ -163,7 +159,7 @@ const Reply = (props: {
|
|
|
163
159
|
}}
|
|
164
160
|
/>
|
|
165
161
|
)}{' '}
|
|
166
|
-
{tab === '전체' &&
|
|
162
|
+
{tab === '전체' && (
|
|
167
163
|
<ViewMore
|
|
168
164
|
loading={loading}
|
|
169
165
|
flag={allTabList.length != listCount.reply}
|
|
@@ -13,7 +13,7 @@ const Success = (props) => {
|
|
|
13
13
|
const getAllPage = () => {
|
|
14
14
|
const itemsToAdd = 4;
|
|
15
15
|
// successList에서 잘라낼 시작 인덱스 계산
|
|
16
|
-
const startIndex =
|
|
16
|
+
const startIndex = allTabList.length;
|
|
17
17
|
const endIndex = startIndex + itemsToAdd;
|
|
18
18
|
const newItems = list.successList.slice(startIndex, endIndex);
|
|
19
19
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -31,20 +31,16 @@ const Success = (props) => {
|
|
|
31
31
|
setAllTabPage(allTabPage + 1);
|
|
32
32
|
};
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
if (allTabList.length
|
|
35
|
-
setAllTabList(list.successList.slice(0, 2));
|
|
34
|
+
if (allTabList.length <= 4) {
|
|
35
|
+
setAllTabList(list.successList.slice(0, isMobileSize ? 2 : 4));
|
|
36
36
|
}
|
|
37
|
-
}, [list.successList]);
|
|
37
|
+
}, [list.successList, isMobileSize]);
|
|
38
38
|
return (<>
|
|
39
39
|
{tab === '전체' || tab === 'success' ? (tab === 'success' && listCount.success < 1 ? (<NoResult />) : (<>
|
|
40
40
|
{listCount.success > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
41
41
|
<Title title={'업무사례'} tab={tab} type={'success'} onClick={str => onMoreViewText(str)} count={listCount.success}/>
|
|
42
42
|
{((_a = list.successList) === null || _a === void 0 ? void 0 : _a.length) !== 0 && (<div className={'mb-9 mt-9 grid gap-[30px] sm:grid-cols-2'}>
|
|
43
|
-
{(tab === '전체'
|
|
44
|
-
? isMobileSize === true
|
|
45
|
-
? allTabList
|
|
46
|
-
: list.successList.slice(0, 4)
|
|
47
|
-
: list.successList).map((item, index) => {
|
|
43
|
+
{(tab === '전체' ? allTabList : list.successList).map((item, index) => {
|
|
48
44
|
var _a, _b;
|
|
49
45
|
return (<Link href={!item.center_code.includes('OF')
|
|
50
46
|
? item.pathname + 'success_new/' + item.id
|
|
@@ -82,7 +78,7 @@ const Success = (props) => {
|
|
|
82
78
|
onMoreView();
|
|
83
79
|
setLoading(false);
|
|
84
80
|
}}/>)}{' '}
|
|
85
|
-
{tab === '전체' &&
|
|
81
|
+
{tab === '전체' && (<ViewMore flag={allTabList.length != listCount.success} func={() => {
|
|
86
82
|
getAllPage();
|
|
87
83
|
}} loading={loading}/>)}
|
|
88
84
|
</div>) : (<></>)}
|
|
@@ -37,7 +37,7 @@ const Success = (props: {
|
|
|
37
37
|
const itemsToAdd = 4;
|
|
38
38
|
|
|
39
39
|
// successList에서 잘라낼 시작 인덱스 계산
|
|
40
|
-
const startIndex =
|
|
40
|
+
const startIndex = allTabList.length;
|
|
41
41
|
const endIndex = startIndex + itemsToAdd;
|
|
42
42
|
const newItems = list.successList.slice(startIndex, endIndex);
|
|
43
43
|
const updatedList = [...allTabList, ...newItems];
|
|
@@ -59,10 +59,10 @@ const Success = (props: {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
useEffect(() => {
|
|
62
|
-
if (allTabList.length
|
|
63
|
-
setAllTabList(list.successList.slice(0, 2));
|
|
62
|
+
if (allTabList.length <= 4) {
|
|
63
|
+
setAllTabList(list.successList.slice(0, isMobileSize ? 2 : 4));
|
|
64
64
|
}
|
|
65
|
-
}, [list.successList]);
|
|
65
|
+
}, [list.successList, isMobileSize]);
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
68
|
<>
|
|
@@ -82,12 +82,7 @@ const Success = (props: {
|
|
|
82
82
|
/>
|
|
83
83
|
{list.successList?.length !== 0 && (
|
|
84
84
|
<div className={'mb-9 mt-9 grid gap-[30px] sm:grid-cols-2'}>
|
|
85
|
-
{(tab === '전체'
|
|
86
|
-
? isMobileSize === true
|
|
87
|
-
? allTabList
|
|
88
|
-
: list.successList.slice(0, 4)
|
|
89
|
-
: list.successList
|
|
90
|
-
).map((item, index) => {
|
|
85
|
+
{(tab === '전체' ? allTabList : list.successList).map((item, index) => {
|
|
91
86
|
return (
|
|
92
87
|
<Link
|
|
93
88
|
href={
|
|
@@ -170,7 +165,7 @@ const Success = (props: {
|
|
|
170
165
|
}}
|
|
171
166
|
/>
|
|
172
167
|
)}{' '}
|
|
173
|
-
{tab === '전체' &&
|
|
168
|
+
{tab === '전체' && (
|
|
174
169
|
<ViewMore
|
|
175
170
|
flag={allTabList.length != listCount.success}
|
|
176
171
|
func={() => {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import Link from 'next/link';
|
|
4
2
|
import { useSearchParams } from 'next/navigation';
|
|
5
3
|
export const Title = (props) => {
|
|
6
4
|
const searchParams = useSearchParams();
|
|
@@ -14,16 +12,34 @@ export const Title = (props) => {
|
|
|
14
12
|
({props.count.toLocaleString()})
|
|
15
13
|
</span>)}
|
|
16
14
|
</p>
|
|
17
|
-
{props.tab === '전체' && !props.noMoreView && (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
{/*{props.tab === '전체' && !props.noMoreView && (*/}
|
|
16
|
+
{/* <Link*/}
|
|
17
|
+
{/* aria-label={props.type + '탭으로 이동'}*/}
|
|
18
|
+
{/* href={`/integrate?search=${querySearch}&tab=${props.type}`}*/}
|
|
19
|
+
{/* tabIndex={0}*/}
|
|
20
|
+
{/* className={*/}
|
|
21
|
+
{/* 'flex cursor-pointer items-center justify-between text-black sm:mt-3 lg:mt-6 xl:mt-7 '*/}
|
|
22
|
+
{/* }*/}
|
|
23
|
+
{/* onClick={() => {*/}
|
|
24
|
+
{/* props.onClick(props.type);*/}
|
|
25
|
+
{/* }}*/}
|
|
26
|
+
{/* onKeyDown={(e: any) => {*/}
|
|
27
|
+
{/* if (e.key === 'Enter') {*/}
|
|
28
|
+
{/* props.onClick(props.type);*/}
|
|
29
|
+
{/* }*/}
|
|
30
|
+
{/* }}*/}
|
|
31
|
+
{/* >*/}
|
|
32
|
+
{/* <span className={'mt-[1px] max-sm:hidden'}>더보기</span>*/}
|
|
33
|
+
{/* <Image*/}
|
|
34
|
+
{/* src={'/images/integrate/right.webp'}*/}
|
|
35
|
+
{/* alt={''}*/}
|
|
36
|
+
{/* title={''}*/}
|
|
37
|
+
{/* width={30}*/}
|
|
38
|
+
{/* height={30}*/}
|
|
39
|
+
{/* className={'ml-3 h-[14px] w-[22px]'}*/}
|
|
40
|
+
{/* />*/}
|
|
41
|
+
{/* </Link>*/}
|
|
42
|
+
{/*)}*/}
|
|
27
43
|
</div>
|
|
28
44
|
<div className={'border-b-[2px] border-solid border-[#B5B5B5] ' + `${props.noUnderBorder ? 'hidden' : ''}`}></div>
|
|
29
45
|
</div>);
|
|
@@ -29,34 +29,34 @@ export const Title = (props: {
|
|
|
29
29
|
</span>
|
|
30
30
|
)}
|
|
31
31
|
</p>
|
|
32
|
-
{props.tab === '전체' && !props.noMoreView && (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)}
|
|
32
|
+
{/*{props.tab === '전체' && !props.noMoreView && (*/}
|
|
33
|
+
{/* <Link*/}
|
|
34
|
+
{/* aria-label={props.type + '탭으로 이동'}*/}
|
|
35
|
+
{/* href={`/integrate?search=${querySearch}&tab=${props.type}`}*/}
|
|
36
|
+
{/* tabIndex={0}*/}
|
|
37
|
+
{/* className={*/}
|
|
38
|
+
{/* 'flex cursor-pointer items-center justify-between text-black sm:mt-3 lg:mt-6 xl:mt-7 '*/}
|
|
39
|
+
{/* }*/}
|
|
40
|
+
{/* onClick={() => {*/}
|
|
41
|
+
{/* props.onClick(props.type);*/}
|
|
42
|
+
{/* }}*/}
|
|
43
|
+
{/* onKeyDown={(e: any) => {*/}
|
|
44
|
+
{/* if (e.key === 'Enter') {*/}
|
|
45
|
+
{/* props.onClick(props.type);*/}
|
|
46
|
+
{/* }*/}
|
|
47
|
+
{/* }}*/}
|
|
48
|
+
{/* >*/}
|
|
49
|
+
{/* <span className={'mt-[1px] max-sm:hidden'}>더보기</span>*/}
|
|
50
|
+
{/* <Image*/}
|
|
51
|
+
{/* src={'/images/integrate/right.webp'}*/}
|
|
52
|
+
{/* alt={''}*/}
|
|
53
|
+
{/* title={''}*/}
|
|
54
|
+
{/* width={30}*/}
|
|
55
|
+
{/* height={30}*/}
|
|
56
|
+
{/* className={'ml-3 h-[14px] w-[22px]'}*/}
|
|
57
|
+
{/* />*/}
|
|
58
|
+
{/* </Link>*/}
|
|
59
|
+
{/*)}*/}
|
|
60
60
|
</div>
|
|
61
61
|
<div
|
|
62
62
|
className={'border-b-[2px] border-solid border-[#B5B5B5] ' + `${props.noUnderBorder ? 'hidden' : ''}`}
|