@daeryun/dr_components 0.4.55 → 0.4.57

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 (35) hide show
  1. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  2. package/dist/components/common/integrate/index.d.ts +1 -1
  3. package/dist/components/page/Integrate/Broadcast.d.ts +1 -0
  4. package/dist/components/page/Integrate/Broadcast.jsx +81 -48
  5. package/dist/components/page/Integrate/Broadcast.tsx +153 -114
  6. package/dist/components/page/Integrate/Field.d.ts +1 -0
  7. package/dist/components/page/Integrate/Field.jsx +40 -16
  8. package/dist/components/page/Integrate/Field.tsx +66 -32
  9. package/dist/components/page/Integrate/LawInfo.d.ts +1 -0
  10. package/dist/components/page/Integrate/LawInfo.jsx +37 -4
  11. package/dist/components/page/Integrate/LawInfo.tsx +51 -5
  12. package/dist/components/page/Integrate/Lawyer.d.ts +1 -0
  13. package/dist/components/page/Integrate/Lawyer.jsx +38 -14
  14. package/dist/components/page/Integrate/Lawyer.tsx +62 -30
  15. package/dist/components/page/Integrate/Map.d.ts +1 -0
  16. package/dist/components/page/Integrate/Map.jsx +45 -31
  17. package/dist/components/page/Integrate/Map.tsx +57 -42
  18. package/dist/components/page/Integrate/Reply.d.ts +1 -0
  19. package/dist/components/page/Integrate/Reply.jsx +55 -22
  20. package/dist/components/page/Integrate/Reply.tsx +102 -60
  21. package/dist/components/page/Integrate/SearchData.jsx +29 -12
  22. package/dist/components/page/Integrate/SearchData.tsx +30 -5
  23. package/dist/components/page/Integrate/Success.d.ts +1 -0
  24. package/dist/components/page/Integrate/Success.jsx +61 -28
  25. package/dist/components/page/Integrate/Success.tsx +106 -62
  26. package/dist/components/page/Integrate/Title.jsx +7 -3
  27. package/dist/components/page/Integrate/Title.tsx +8 -3
  28. package/dist/components/page/Integrate/ViewMore.d.ts +1 -1
  29. package/dist/components/page/Integrate/ViewMore.jsx +13 -13
  30. package/dist/components/page/Integrate/ViewMore.tsx +38 -41
  31. package/dist/components/page/MyCase/_fetchers/addMyFileUpload.js +2 -2
  32. package/dist/components/page/MyCase/_fetchers/addMyFileUpload.ts +2 -2
  33. package/dist/styles/globals.css +182 -177
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import Link from 'next/link';
3
3
  import Image from 'next/image';
4
4
  import { NoResult } from './NoResult';
@@ -6,15 +6,45 @@ import { Title } from './Title';
6
6
  import { ViewMore } from './ViewMore';
7
7
  import { searchColorText } from '../../common/integrate';
8
8
  const LawInfo = (props) => {
9
- const { tab, onMoreViewText, list, pages, onMoreView, search, listCount } = props;
9
+ const { tab, onMoreViewText, list, pages, onMoreView, search, isMobileSize, listCount } = props;
10
10
  const [loading, setLoading] = useState(false);
11
+ const [allTabPage, setAllTabPage] = useState(0);
12
+ const [allTabList, setAllTabList] = useState([]);
13
+ const getAllPage = () => {
14
+ const itemsToAdd = 4;
15
+ // infoList에서 잘라낼 시작 인덱스 계산
16
+ const startIndex = 2 + allTabPage * 4;
17
+ const endIndex = startIndex + itemsToAdd;
18
+ const newItems = list.infoList.slice(startIndex, endIndex);
19
+ const updatedList = [...allTabList, ...newItems];
20
+ setAllTabList(updatedList);
21
+ // 다음 호출 후 예상 총 개수
22
+ const nextTotalCount = updatedList.length + itemsToAdd;
23
+ // 현재 successList의 길이
24
+ const currentListLength = list.infoList.length;
25
+ // 다음 총 개수가 infoList 길이를 초과하면 api 호출
26
+ // 예: infoList가 24일 때, 22 -> 26이 되면 호출
27
+ if (nextTotalCount > currentListLength) {
28
+ onMoreView();
29
+ }
30
+ // 페이지 상태 증가
31
+ setAllTabPage(allTabPage + 1);
32
+ };
33
+ useEffect(() => {
34
+ if (allTabList.length === 0) {
35
+ setAllTabList(list.infoList.slice(0, 2));
36
+ }
37
+ }, [list.infoList]);
11
38
  return (<>
12
39
  {tab === '전체' || tab === 'info' ? (tab === 'info' && listCount.info < 1 ? (<NoResult />) : (<>
13
40
  {listCount.info > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
14
41
  <Title title={'법률정보'} tab={tab} type={'info'} onClick={str => onMoreViewText(str)} count={listCount.info}/>
15
-
16
42
  <div className={'grid w-full gap-[40px] sm:grid-cols-2 sm:gap-[30px] lg:grid-cols-4 lg:gap-[16px]'}>
17
- {(tab === '전체' ? list.infoList.slice(0, 4) : list.infoList).map((item, index) => {
43
+ {(tab === '전체'
44
+ ? isMobileSize === true
45
+ ? allTabList
46
+ : list.infoList.slice(0, 4)
47
+ : list.infoList).map((item, index) => {
18
48
  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'}>
19
49
  <div className={'relative aspect-[1.47] w-full overflow-hidden max-sm:h-full max-sm:w-full'}>
20
50
  <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 '}/>
@@ -29,6 +59,9 @@ const LawInfo = (props) => {
29
59
  setLoading(true);
30
60
  onMoreView();
31
61
  setLoading(false);
62
+ }}/>)}
63
+ {tab === '전체' && isMobileSize === true && (<ViewMore flag={allTabList.length != listCount.info} func={() => {
64
+ getAllPage();
32
65
  }}/>)}
33
66
  </div>) : (<></>)}
34
67
  </>)) : null}
@@ -1,13 +1,14 @@
1
- import React, { useRef, useState } from 'react';
1
+ import React, { useEffect, useRef, useState } from 'react';
2
2
  import Link from 'next/link';
3
3
  import Image from 'next/image';
4
4
  import { NoResult } from './NoResult';
5
- import { IListPagesType, IListTypes } from './integrateType';
5
+ import { IInfoTypes, IListPagesType, IListTypes } from './integrateType';
6
6
  import { Title } from './Title';
7
7
  import { ViewMore } from './ViewMore';
8
8
  import { searchColorText } from '../../common/integrate';
9
9
 
10
10
  const LawInfo = (props: {
11
+ isMobileSize: boolean | null;
11
12
  tab: string;
12
13
  onMoreViewText: (str: string) => void;
13
14
  onMoreView: () => void;
@@ -25,8 +26,41 @@ const LawInfo = (props: {
25
26
  };
26
27
  search: string;
27
28
  }) => {
28
- const { tab, onMoreViewText, list, pages, onMoreView, search, listCount } = props;
29
+ const { tab, onMoreViewText, list, pages, onMoreView, search, isMobileSize, listCount } = props;
29
30
  const [loading, setLoading] = useState<boolean>(false);
31
+ const [allTabPage, setAllTabPage] = useState<number>(0);
32
+ const [allTabList, setAllTabList] = useState<IInfoTypes[]>([]);
33
+
34
+ const getAllPage = () => {
35
+ const itemsToAdd = 4;
36
+
37
+ // infoList에서 잘라낼 시작 인덱스 계산
38
+ const startIndex = 2 + allTabPage * 4;
39
+ const endIndex = startIndex + itemsToAdd;
40
+ const newItems = list.infoList.slice(startIndex, endIndex);
41
+ const updatedList = [...allTabList, ...newItems];
42
+ setAllTabList(updatedList);
43
+
44
+ // 다음 호출 후 예상 총 개수
45
+ const nextTotalCount = updatedList.length + itemsToAdd;
46
+ // 현재 successList의 길이
47
+ const currentListLength = list.infoList.length;
48
+
49
+ // 다음 총 개수가 infoList 길이를 초과하면 api 호출
50
+ // 예: infoList가 24일 때, 22 -> 26이 되면 호출
51
+ if (nextTotalCount > currentListLength) {
52
+ onMoreView();
53
+ }
54
+
55
+ // 페이지 상태 증가
56
+ setAllTabPage(allTabPage + 1);
57
+ };
58
+
59
+ useEffect(() => {
60
+ if (allTabList.length === 0) {
61
+ setAllTabList(list.infoList.slice(0, 2));
62
+ }
63
+ }, [list.infoList]);
30
64
 
31
65
  return (
32
66
  <>
@@ -44,13 +78,17 @@ const LawInfo = (props: {
44
78
  onClick={str => onMoreViewText(str)}
45
79
  count={listCount.info}
46
80
  />
47
-
48
81
  <div
49
82
  className={
50
83
  'grid w-full gap-[40px] sm:grid-cols-2 sm:gap-[30px] lg:grid-cols-4 lg:gap-[16px]'
51
84
  }
52
85
  >
53
- {(tab === '전체' ? list.infoList.slice(0, 4) : list.infoList).map((item, index) => {
86
+ {(tab === '전체'
87
+ ? isMobileSize === true
88
+ ? allTabList
89
+ : list.infoList.slice(0, 4)
90
+ : list.infoList
91
+ ).map((item, index) => {
54
92
  return (
55
93
  <Link
56
94
  key={item.pathname + 'lawinfo_new/' + item.idx}
@@ -95,6 +133,14 @@ const LawInfo = (props: {
95
133
  }}
96
134
  />
97
135
  )}
136
+ {tab === '전체' && isMobileSize === true && (
137
+ <ViewMore
138
+ flag={allTabList.length != listCount.info}
139
+ func={() => {
140
+ getAllPage();
141
+ }}
142
+ />
143
+ )}
98
144
  </div>
99
145
  ) : (
100
146
  <></>
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { IListPagesType, IListTypes } from './integrateType';
3
3
  declare const Lawyer: (props: {
4
+ isMobileSize: boolean | null;
4
5
  tab: string;
5
6
  onMoreViewText: (str: string) => void;
6
7
  onMoreView: () => void;
@@ -2,15 +2,14 @@ import React, { useEffect, useState } from 'react';
2
2
  import { NoResult } from './NoResult';
3
3
  import { Title } from './Title';
4
4
  import { ViewMore } from './ViewMore';
5
- import * as gtag from '../../../lib/gtag';
6
5
  import mobile from 'is-mobile';
7
- import { useRouter } from 'next/router';
6
+ import { useRouter } from 'next/navigation';
8
7
  import Link from 'next/link';
9
8
  import Image from 'next/image';
10
9
  import style from './index.module.css';
11
10
  import Mark from '../../Mark/Mark';
12
11
  const Lawyer = (props) => {
13
- const { tab, onMoreViewText, list, pages, listCount } = props;
12
+ const { tab, onMoreViewText, list, pages, listCount, isMobileSize } = props;
14
13
  const [loading, setLoading] = useState(false);
15
14
  const [isMobile, setIsMobile] = useState(false);
16
15
  const lawyerImagePath = 'https://d1tgonli21s4df.cloudfront.net/upload/lawyer';
@@ -18,6 +17,33 @@ const Lawyer = (props) => {
18
17
  const is_mobile = mobile();
19
18
  setIsMobile(is_mobile);
20
19
  }, []);
20
+ const [allTabPage, setAllTabPage] = useState(0);
21
+ const [allTabList, setAllTabList] = useState([]);
22
+ const getAllPage = () => {
23
+ const itemsToAdd = 6;
24
+ // lawyerList에서 잘라낼 시작 인덱스 계산
25
+ const startIndex = 6 + allTabPage * 6;
26
+ const endIndex = startIndex + itemsToAdd;
27
+ const newItems = list.lawyerList.slice(startIndex, endIndex);
28
+ const updatedList = [...allTabList, ...newItems];
29
+ setAllTabList(updatedList);
30
+ // 다음 호출 후 예상 총 개수
31
+ const nextTotalCount = updatedList.length + itemsToAdd;
32
+ // 현재 lawyerList의 길이
33
+ const currentListLength = list.lawyerList.length;
34
+ // 다음 총 개수가 lawyerList 길이를 초과하면 api 호출
35
+ // 예: lawyerList가 24일 때, 22 -> 26이 되면 호출
36
+ if (nextTotalCount > currentListLength) {
37
+ props.onMoreView();
38
+ }
39
+ // 페이지 상태 증가
40
+ setAllTabPage(allTabPage + 1);
41
+ };
42
+ useEffect(() => {
43
+ if (allTabList.length === 0) {
44
+ setAllTabList(list.lawyerList.slice(0, 6));
45
+ }
46
+ }, [list.lawyerList]);
21
47
  return props.tab === '전체' || props.tab === 'lawyer' ? (
22
48
  //구성원 탭에서는 결과 없음
23
49
  tab === 'lawyer' && listCount.lawyer < 1 ? (<NoResult />) : (<>
@@ -26,7 +52,11 @@ const Lawyer = (props) => {
26
52
  <Title title={'구성원'} tab={tab} type={'lawyer'} onClick={str => onMoreViewText(str)} count={listCount.lawyer}/>
27
53
 
28
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'}>
29
- {(tab === '전체' ? list.lawyerList.slice(0, 8) : list.lawyerList).map((item, index) => {
55
+ {(tab === '전체'
56
+ ? isMobileSize === true
57
+ ? allTabList
58
+ : list.lawyerList.slice(0, 8)
59
+ : list.lawyerList).map((item, index) => {
30
60
  return (<LawyerContainer key={item.id} center_code={props.center_code} item={item} lawyerImagePath={lawyerImagePath}/>);
31
61
  })}
32
62
  </div>
@@ -35,6 +65,9 @@ const Lawyer = (props) => {
35
65
  props.onMoreView();
36
66
  setLoading(false);
37
67
  }} loading={loading} totalPage={Math.ceil(listCount.lawyer / 12)} nowPage={pages.lawyerList}/>)}
68
+ {tab === '전체' && isMobileSize === true && (<ViewMore flag={allTabList.length != listCount.lawyer} func={() => {
69
+ getAllPage();
70
+ }}/>)}
38
71
  </div>) : (<></>)}
39
72
  </>)) : null;
40
73
  };
@@ -43,14 +76,6 @@ const LawyerContainer = (props) => {
43
76
  var _a;
44
77
  const { item, lawyerImagePath, selectedFilter = '', onClickTel, isPro = false } = props;
45
78
  const router = useRouter();
46
- const MailClick = () => {
47
- gtag.event({
48
- action: 'mail_complete',
49
- category: 'mail',
50
- label: '변호사이메일버튼',
51
- value: '1'
52
- });
53
- };
54
79
  if (!isPro) {
55
80
  return (<span className={'relative flex justify-center'}>
56
81
  <div className={'flex w-[95%] flex-col sm:w-[80%]'}>
@@ -72,8 +97,7 @@ const LawyerContainer = (props) => {
72
97
  </Link>
73
98
  <div className={'m-3 flex h-full flex-col justify-between'}>
74
99
  <Link href={{
75
- pathname: '/lawyer/' + item.id,
76
- query: Object.assign({}, router.query)
100
+ pathname: '/lawyer/' + item.id
77
101
  }}>
78
102
  <span>
79
103
  <div className={'flex items-center justify-between'}>
@@ -1,18 +1,17 @@
1
- import React, { RefObject, useEffect, useRef, useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { NoResult } from './NoResult';
3
3
  import { Title } from './Title';
4
4
  import { ILawyerTypes, IListPagesType, IListTypes } from './integrateType';
5
5
  import { ViewMore } from './ViewMore';
6
-
7
- import * as gtag from '../../../lib/gtag';
8
6
  import mobile from 'is-mobile';
9
- import { useRouter } from 'next/router';
7
+ import { useRouter } from 'next/navigation';
10
8
  import Link from 'next/link';
11
9
  import Image from 'next/image';
12
10
  import style from './index.module.css';
13
11
  import Mark from '../../Mark/Mark';
14
12
 
15
13
  const Lawyer = (props: {
14
+ isMobileSize: boolean | null;
16
15
  tab: string;
17
16
  onMoreViewText: (str: string) => void;
18
17
  onMoreView: () => void;
@@ -29,7 +28,7 @@ const Lawyer = (props: {
29
28
  map: number;
30
29
  };
31
30
  }) => {
32
- const { tab, onMoreViewText, list, pages, listCount } = props;
31
+ const { tab, onMoreViewText, list, pages, listCount, isMobileSize } = props;
33
32
 
34
33
  const [loading, setLoading] = useState<boolean>(false);
35
34
  const [isMobile, setIsMobile] = useState<boolean>(false);
@@ -40,6 +39,40 @@ const Lawyer = (props: {
40
39
  setIsMobile(is_mobile);
41
40
  }, []);
42
41
 
42
+ const [allTabPage, setAllTabPage] = useState<number>(0);
43
+ const [allTabList, setAllTabList] = useState<ILawyerTypes[]>([]);
44
+
45
+ const getAllPage = () => {
46
+ const itemsToAdd = 6;
47
+
48
+ // lawyerList에서 잘라낼 시작 인덱스 계산
49
+ const startIndex = 6 + allTabPage * 6;
50
+ const endIndex = startIndex + itemsToAdd;
51
+ const newItems = list.lawyerList.slice(startIndex, endIndex);
52
+ const updatedList = [...allTabList, ...newItems];
53
+ setAllTabList(updatedList);
54
+
55
+ // 다음 호출 후 예상 총 개수
56
+ const nextTotalCount = updatedList.length + itemsToAdd;
57
+ // 현재 lawyerList의 길이
58
+ const currentListLength = list.lawyerList.length;
59
+
60
+ // 다음 총 개수가 lawyerList 길이를 초과하면 api 호출
61
+ // 예: lawyerList가 24일 때, 22 -> 26이 되면 호출
62
+ if (nextTotalCount > currentListLength) {
63
+ props.onMoreView();
64
+ }
65
+
66
+ // 페이지 상태 증가
67
+ setAllTabPage(allTabPage + 1);
68
+ };
69
+
70
+ useEffect(() => {
71
+ if (allTabList.length === 0) {
72
+ setAllTabList(list.lawyerList.slice(0, 6));
73
+ }
74
+ }, [list.lawyerList]);
75
+
43
76
  return props.tab === '전체' || props.tab === 'lawyer' ? (
44
77
  //구성원 탭에서는 결과 없음
45
78
  tab === 'lawyer' && listCount.lawyer < 1 ? (
@@ -62,18 +95,21 @@ const Lawyer = (props: {
62
95
  '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'
63
96
  }
64
97
  >
65
- {(tab === '전체' ? list.lawyerList.slice(0, 8) : list.lawyerList).map(
66
- (item, index: number) => {
67
- return (
68
- <LawyerContainer
69
- key={item.id}
70
- center_code={props.center_code}
71
- item={item}
72
- lawyerImagePath={lawyerImagePath}
73
- />
74
- );
75
- }
76
- )}
98
+ {(tab === '전체'
99
+ ? isMobileSize === true
100
+ ? allTabList
101
+ : list.lawyerList.slice(0, 8)
102
+ : list.lawyerList
103
+ ).map((item, index: number) => {
104
+ return (
105
+ <LawyerContainer
106
+ key={item.id}
107
+ center_code={props.center_code}
108
+ item={item}
109
+ lawyerImagePath={lawyerImagePath}
110
+ />
111
+ );
112
+ })}
77
113
  </div>
78
114
  {tab != '전체' && (
79
115
  <ViewMore
@@ -88,6 +124,14 @@ const Lawyer = (props: {
88
124
  nowPage={pages.lawyerList}
89
125
  />
90
126
  )}
127
+ {tab === '전체' && isMobileSize === true && (
128
+ <ViewMore
129
+ flag={allTabList.length != listCount.lawyer}
130
+ func={() => {
131
+ getAllPage();
132
+ }}
133
+ />
134
+ )}
91
135
  </div>
92
136
  ) : (
93
137
  <></>
@@ -114,15 +158,6 @@ const LawyerContainer = (props: {
114
158
  const { item, lawyerImagePath, selectedFilter = '', onClickTel, isPro = false } = props;
115
159
  const router = useRouter();
116
160
 
117
- const MailClick = () => {
118
- gtag.event({
119
- action: 'mail_complete',
120
- category: 'mail',
121
- label: '변호사이메일버튼',
122
- value: '1'
123
- });
124
- };
125
-
126
161
  if (!isPro) {
127
162
  return (
128
163
  <span className={'relative flex justify-center'}>
@@ -170,10 +205,7 @@ const LawyerContainer = (props: {
170
205
  <div className={'m-3 flex h-full flex-col justify-between'}>
171
206
  <Link
172
207
  href={{
173
- pathname: '/lawyer/' + item.id,
174
- query: {
175
- ...router.query
176
- }
208
+ pathname: '/lawyer/' + item.id
177
209
  }}
178
210
  >
179
211
  <span>
@@ -1,6 +1,7 @@
1
1
  import { IListPagesType, IListTypes } from './integrateType';
2
2
  import React from 'react';
3
3
  declare const Map: (props: {
4
+ isMobileSize: boolean | null;
4
5
  tab: string;
5
6
  onMoreViewText: (str: string) => void;
6
7
  onMoreView: () => void;
@@ -1,40 +1,54 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import React, { useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
11
2
  import Image from 'next/image';
12
3
  import { NoResult } from './NoResult';
13
4
  import { Title } from './Title';
14
5
  import { ViewMore } from './ViewMore';
15
- import { useRouter } from 'next/router';
6
+ import { useRouter } from 'next/navigation';
16
7
  import { searchColorText } from '../../common/integrate';
17
8
  const Map = (props) => {
18
9
  const router = useRouter();
19
- const { tab, onMoreViewText, list, pages } = props;
10
+ const { tab, onMoreViewText, list, isMobileSize, pages } = props;
20
11
  const [loading, setLoading] = useState(false);
12
+ const [allTabPage, setAllTabPage] = useState(0);
13
+ const [allTabList, setAllTabList] = useState([]);
14
+ const getAllPage = () => {
15
+ const itemsToAdd = 5;
16
+ // imapList에서 잘라낼 시작 인덱스 계산
17
+ const startIndex = 5 + allTabPage * 5;
18
+ const endIndex = startIndex + itemsToAdd;
19
+ const newItems = list.mapList.slice(startIndex, endIndex);
20
+ const updatedList = [...allTabList, ...newItems];
21
+ setAllTabList(updatedList);
22
+ // 다음 호출 후 예상 총 개수
23
+ const nextTotalCount = updatedList.length + itemsToAdd;
24
+ // 현재 successList의 길이
25
+ const currentListLength = list.mapList.length;
26
+ // 다음 총 개수가 mapList 길이를 초과하면 api 호출
27
+ // 예: mapList가 24일 때, 22 -> 26이 되면 호출
28
+ if (nextTotalCount > currentListLength) {
29
+ props.onMoreView();
30
+ }
31
+ // 페이지 상태 증가
32
+ setAllTabPage(allTabPage + 1);
33
+ };
34
+ useEffect(() => {
35
+ if (allTabList.length === 0) {
36
+ setAllTabList(list.mapList.slice(0, 5));
37
+ }
38
+ }, [list.mapList]);
21
39
  return props.tab === '전체' || props.tab === 'map' ? (
22
40
  //구성원 탭에서는 결과 없음
23
41
  tab === 'map' && props.listCount.map < 1 ? (<NoResult />) : (<>
24
42
  {/*전체 탭에서는 없게*/}
25
43
  {props.listCount.map > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
26
- <Title title={'오시는길'} tab={tab} type={'map'} count={props.listCount.map} onClick={() => __awaiter(void 0, void 0, void 0, function* () {
27
- yield router.push('/map');
28
- })}/>
29
-
44
+ <Title title={'오시는길'} tab={tab} type={'map'} count={props.listCount.map} onClick={str => onMoreViewText(str)}/>
30
45
  <div className={'mt-[-1.5rem] w-full'}>
31
- {(tab === '전체' && !props.search && list.mainMapList
32
- ? list.mainMapList.slice(0, 5)
33
- : tab === '전체' && props.search
34
- ? list.mapList.slice(0, 5)
35
- : list.mapList).map((item, index) => {
36
- var _a, _b, _c;
37
- return (<div key={'integrate_' + item.key} className={'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
46
+ {(tab === '전체'
47
+ ? isMobileSize === true
48
+ ? allTabList
49
+ : list.mapList.slice(0, 5)
50
+ : list.mapList).map((item, index) => {
51
+ return (<div key={'integrate_map' + item.key} className={'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
38
52
  //1280px
39
53
  'max-xl:gap-[0] ' +
40
54
  //1024px
@@ -80,29 +94,29 @@ const Map = (props) => {
80
94
  <span className={'grow ' +
81
95
  //640px
82
96
  'max-sm:hidden'}>
83
- <MapInfoCon locale={(_a = router.locale) !== null && _a !== void 0 ? _a : ''} title={'주소'} text={<>
97
+ <MapInfoCon locale={'ko'} title={'주소'} text={<>
84
98
  {item.address
85
99
  .replaceAll('법무법인(유한)대륜', '')
86
100
  .replaceAll('법무법인(유한) 대륜', '')}
87
101
  </>}/>
88
- <MapInfoCon locale={(_b = router.locale) !== null && _b !== void 0 ? _b : ''} title={'업무시간'} text={<>
102
+ <MapInfoCon locale={'ko'} title={'업무시간'} text={<>
89
103
  {item.worktime.split(' | ').map((i, index) => (<span key={item.key + '_work_time_' + index} className={'block'}>
90
104
  {i}
91
105
  </span>))}
92
106
  </>}/>
93
- <MapInfoCon locale={(_c = router.locale) !== null && _c !== void 0 ? _c : ''} title={'대표번호'} text={<>{item.tel}</>}/>
107
+ <MapInfoCon locale={'ko'} title={'대표번호'} text={<>{item.tel}</>}/>
94
108
  </span>
95
109
  </div>);
96
110
  })}
97
111
  </div>
98
- {tab != '전체' ? (<ViewMore flag={list.mapList.length != props.listCount.map} func={() => {
112
+ {tab != '전체' && (<ViewMore flag={list.mapList.length != props.listCount.map} func={() => {
99
113
  setLoading(true);
100
114
  props.onMoreView();
101
115
  setLoading(false);
102
- }} loading={loading} totalPage={Math.ceil(props.listCount.map / 12)} nowPage={pages.mapList}/>) : (<button className={'relative m-auto mb-20 mt-20 flex w-[10em] cursor-pointer items-center justify-between border-[1px] border-solid border-[#707070] px-5 py-4 text-[#666666]'} onClick={str => onMoreViewText('map')} aria-label={'오시는길 더보기'}>
103
- <span className={'pt-[2px] leading-[15px] text-[#666666] '}>더보기</span>
104
- <Image src={'/images/plus_g.webp'} alt={'+'} title={'+'} width={30} height={30} className={'aspect-square w-[18px] max-lg:w-[16px] max-sm:w-[15px] max-2xs:w-[13px]'}/>
105
- </button>)}
116
+ }} loading={loading} totalPage={Math.ceil(props.listCount.map / 12)} nowPage={pages.mapList}/>)}
117
+ {tab === '전체' && isMobileSize === true && (<ViewMore flag={allTabList.length != props.listCount.map} func={() => {
118
+ getAllPage();
119
+ }}/>)}
106
120
  </div>) : (<></>)}
107
121
  </>)) : null;
108
122
  };