@daeryun/dr_components 0.4.38 → 0.4.40

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 (50) hide show
  1. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  2. package/dist/components/common/integrate/index.d.ts +12 -0
  3. package/dist/components/common/integrate/index.jsx +71 -0
  4. package/dist/components/common/integrate/index.tsx +79 -0
  5. package/dist/components/page/Integrate/Broadcast.d.ts +20 -0
  6. package/dist/components/page/Integrate/Broadcast.jsx +107 -0
  7. package/dist/components/page/Integrate/Broadcast.tsx +246 -0
  8. package/dist/components/page/Integrate/Field.d.ts +21 -0
  9. package/dist/components/page/Integrate/Field.jsx +53 -0
  10. package/dist/components/page/Integrate/Field.tsx +119 -0
  11. package/dist/components/page/Integrate/LawInfo.d.ts +21 -0
  12. package/dist/components/page/Integrate/LawInfo.jsx +40 -0
  13. package/dist/components/page/Integrate/LawInfo.tsx +116 -0
  14. package/dist/components/page/Integrate/Lawyer.d.ts +36 -0
  15. package/dist/components/page/Integrate/Lawyer.jsx +175 -0
  16. package/dist/components/page/Integrate/Lawyer.tsx +394 -0
  17. package/dist/components/page/Integrate/Map.d.ts +20 -0
  18. package/dist/components/page/Integrate/Map.jsx +131 -0
  19. package/dist/components/page/Integrate/Map.tsx +266 -0
  20. package/dist/components/page/Integrate/MenuTab.d.ts +18 -0
  21. package/dist/components/page/Integrate/MenuTab.jsx +90 -0
  22. package/dist/components/page/Integrate/MenuTab.tsx +160 -0
  23. package/dist/components/page/Integrate/NoResult.d.ts +2 -0
  24. package/dist/components/page/Integrate/NoResult.jsx +14 -0
  25. package/dist/components/page/Integrate/NoResult.tsx +23 -0
  26. package/dist/components/page/Integrate/Reply.d.ts +21 -0
  27. package/dist/components/page/Integrate/Reply.jsx +68 -0
  28. package/dist/components/page/Integrate/Reply.tsx +162 -0
  29. package/dist/components/page/Integrate/SearchData.d.ts +19 -0
  30. package/dist/components/page/Integrate/SearchData.jsx +166 -0
  31. package/dist/components/page/Integrate/SearchData.tsx +273 -0
  32. package/dist/components/page/Integrate/Success.d.ts +21 -0
  33. package/dist/components/page/Integrate/Success.jsx +74 -0
  34. package/dist/components/page/Integrate/Success.tsx +167 -0
  35. package/dist/components/page/Integrate/Title.d.ts +10 -0
  36. package/dist/components/page/Integrate/Title.jsx +27 -0
  37. package/dist/components/page/Integrate/Title.tsx +62 -0
  38. package/dist/components/page/Integrate/ViewMore.d.ts +9 -0
  39. package/dist/components/page/Integrate/ViewMore.jsx +28 -0
  40. package/dist/components/page/Integrate/ViewMore.tsx +66 -0
  41. package/dist/components/page/Integrate/index.module.css +915 -0
  42. package/dist/components/page/Integrate/integrateType.d.ts +159 -0
  43. package/dist/components/page/Integrate/integrateType.js +30 -0
  44. package/dist/components/page/Integrate/integrateType.ts +171 -0
  45. package/dist/components/page/index.d.ts +2 -0
  46. package/dist/components/page/index.js +2 -0
  47. package/dist/components/page/index.ts +2 -0
  48. package/dist/styles/globals.css +1072 -161
  49. package/dist/tsconfig.tsbuildinfo +1 -1
  50. package/package.json +1 -1
@@ -0,0 +1,273 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import { NoResult } from './NoResult';
3
+ import { IListPagesType, IListTypes, searchInit } from './integrateType';
4
+ import { useRouter } from 'next/router';
5
+ // import Lawyer from './Lawyer';
6
+ import Field from './Field';
7
+ import Success from './Success';
8
+ import LawInfo from './LawInfo';
9
+ import Broadcast from './Broadcast';
10
+ import Reply from './Reply';
11
+ import Map from './Map';
12
+
13
+ const SearchData = ({
14
+ list: propsList,
15
+ totalCount,
16
+ listCount,
17
+ center_code,
18
+ crime_code
19
+ }: {
20
+ list: IListTypes;
21
+ totalCount: number;
22
+ center_code: string;
23
+ crime_code: string;
24
+ listCount: {
25
+ lawyer: number;
26
+ field: number;
27
+ success: number;
28
+ info: number;
29
+ broadcast: number;
30
+ reply: number;
31
+ map: number;
32
+ };
33
+ }) => {
34
+ const router = useRouter();
35
+ const [tab, setTab] = useState<string>('');
36
+ const [search, setSearch] = useState<string>('');
37
+ const [list, setList] = useState<IListTypes>(searchInit.list);
38
+ const [pages, setPages] = useState<IListPagesType>(searchInit.pages);
39
+
40
+ const handleMoreView = (key: string, data: any[]) => {
41
+ // @ts-ignore
42
+ setPages({ ...pages, [key]: pages[key] + 1 });
43
+ // @ts-ignore
44
+ setList({ ...list, [key]: [...list[key], ...data] });
45
+ };
46
+
47
+ const handleMoreViewText = async (tab: any) => {
48
+ await router.push(`/integrate?search=${router.query.search}&tab=${tab}`);
49
+ };
50
+
51
+ useEffect(() => {
52
+ setList(propsList);
53
+ }, [propsList]);
54
+
55
+ useEffect(() => {
56
+ setSearch(String(router.query.search));
57
+ setTab(String(router.query.tab));
58
+ // setPages(searchInit.pages)
59
+ }, [router.query]);
60
+
61
+ return (
62
+ <span id={'integrate-result'}>
63
+ {tab === '전체' && totalCount < 1 ? (
64
+ <NoResult />
65
+ ) : (
66
+ <>
67
+ <Success
68
+ center_code={center_code}
69
+ tab={tab}
70
+ list={list}
71
+ pages={pages}
72
+ onMoreViewText={handleMoreViewText}
73
+ onMoreView={() => {
74
+ paramFetch(
75
+ '/api/integrate/list',
76
+ {
77
+ page: pages.successList,
78
+ type: 'success',
79
+ search: search,
80
+ center_code: center_code,
81
+ crime_code: crime_code
82
+ },
83
+ (obj: any) => {
84
+ handleMoreView('successList', obj.data.list.successList);
85
+ }
86
+ );
87
+ }}
88
+ search={search}
89
+ listCount={listCount}
90
+ />
91
+
92
+ <Reply
93
+ crime_code={crime_code}
94
+ tab={tab}
95
+ list={list}
96
+ pages={pages}
97
+ onMoreViewText={handleMoreViewText}
98
+ onMoreView={() => {
99
+ paramFetch(
100
+ '/api/integrate/list',
101
+ {
102
+ page: pages.replyList,
103
+ type: 'reply',
104
+ search: search,
105
+ center_code: center_code,
106
+ crime_code: crime_code
107
+ },
108
+ (obj: any) => {
109
+ handleMoreView('replyList', obj.data.list.replyList);
110
+ }
111
+ );
112
+ }}
113
+ listCount={listCount}
114
+ search={search}
115
+ />
116
+
117
+ <LawInfo
118
+ center_code={center_code}
119
+ tab={tab}
120
+ list={list}
121
+ pages={pages}
122
+ listCount={listCount}
123
+ onMoreViewText={handleMoreViewText}
124
+ onMoreView={() => {
125
+ paramFetch(
126
+ '/api/integrate/list',
127
+ {
128
+ page: pages.infoList,
129
+ type: 'info',
130
+ search: search,
131
+ center_code: center_code,
132
+ crime_code: crime_code
133
+ },
134
+ (obj: any) => {
135
+ handleMoreView('infoList', obj.data.list.infoList);
136
+ }
137
+ );
138
+ }}
139
+ search={search}
140
+ />
141
+
142
+ {/*<Lawyer*/}
143
+ {/* tab={tab}*/}
144
+ {/* listCount={listCount}*/}
145
+ {/* list={list}*/}
146
+ {/* pages={pages}*/}
147
+ {/* center_code={center_code}*/}
148
+ {/* onMoreViewText={handleMoreViewText}*/}
149
+ {/* onMoreView={() => {*/}
150
+ {/* paramFetch(*/}
151
+ {/* `api/integrate/list`,*/}
152
+ {/* {*/}
153
+ {/* page: pages.lawyerList,*/}
154
+ {/* type: 'lawyer',*/}
155
+ {/* search: search,*/}
156
+ {/* center_code: center_code,*/}
157
+ {/* crime_code: crime_code*/}
158
+ {/* },*/}
159
+ {/* (obj: any) => {*/}
160
+ {/* handleMoreView('lawyerList', obj.data.list.lawyerList);*/}
161
+ {/* }*/}
162
+ {/* );*/}
163
+ {/* }}*/}
164
+ {/*/>*/}
165
+
166
+ <Broadcast
167
+ listCount={listCount}
168
+ tab={tab}
169
+ list={list}
170
+ pages={pages}
171
+ onMoreViewText={handleMoreViewText}
172
+ onMoreView={() => {
173
+ paramFetch(
174
+ '/api/integrate/list',
175
+ {
176
+ page: pages.broadcastList,
177
+ type: 'broadcast',
178
+ search: search,
179
+ center_code: center_code,
180
+ crime_code: crime_code
181
+ },
182
+ (obj: any) => {
183
+ handleMoreView('broadcastList', obj.data.list.broadcastList);
184
+ }
185
+ );
186
+ }}
187
+ search={search}
188
+ />
189
+
190
+ <Field
191
+ listCount={listCount}
192
+ center_code={center_code}
193
+ tab={tab}
194
+ list={list}
195
+ pages={pages}
196
+ onMoreViewText={handleMoreViewText}
197
+ onMoreView={() => {
198
+ paramFetch(
199
+ `/api/integrate/list`,
200
+ {
201
+ page: pages.fieldList,
202
+ type: 'field',
203
+ search: search,
204
+ center_code: center_code,
205
+ crime_code: crime_code
206
+ },
207
+
208
+ (obj: any) => {
209
+ handleMoreView('fieldList', obj.data.list.fieldList);
210
+ }
211
+ );
212
+ }}
213
+ search={search}
214
+ />
215
+
216
+ <Map
217
+ listCount={listCount}
218
+ tab={tab}
219
+ list={list}
220
+ pages={pages}
221
+ onMoreViewText={handleMoreViewText}
222
+ search={search}
223
+ onMoreView={() => {
224
+ paramFetch(
225
+ '/api/integrate/list',
226
+ {
227
+ page: pages.mapList,
228
+ type: 'map',
229
+ search: search,
230
+ center_code: center_code,
231
+ crime_code: crime_code
232
+ },
233
+ (obj: any) => {
234
+ handleMoreView('mapList', obj.data.list.mapList);
235
+ }
236
+ );
237
+ }}
238
+ />
239
+ </>
240
+ )}
241
+ </span>
242
+ );
243
+ };
244
+
245
+ export default SearchData;
246
+
247
+ export async function paramFetch(
248
+ url: string,
249
+ sendData: Record<string, any>,
250
+ processFn: (data: any) => void | Promise<void>
251
+ ) {
252
+ const params = new URLSearchParams(sendData).toString();
253
+ const requestUrl = params ? `${url}?${params}` : url;
254
+
255
+ const headers = {
256
+ 'Content-Type': 'application/json'
257
+ };
258
+
259
+ const requestOptions = {
260
+ method: 'GET',
261
+ headers
262
+ };
263
+
264
+ try {
265
+ const response = await fetch(requestUrl, requestOptions);
266
+ const data = await response.json();
267
+
268
+ // processFn이 비동기 함수일 수도 있으므로 Promise.resolve() 사용
269
+ await Promise.resolve(processFn(data));
270
+ } catch (error) {
271
+ console.error('Fetch error:', error);
272
+ }
273
+ }
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { IListPagesType, IListTypes } from './integrateType';
3
+ declare const Success: (props: {
4
+ tab: string;
5
+ onMoreViewText: (str: string) => void;
6
+ onMoreView: () => void;
7
+ list: IListTypes;
8
+ pages: IListPagesType;
9
+ center_code: string;
10
+ search: string;
11
+ listCount: {
12
+ lawyer: number;
13
+ field: number;
14
+ success: number;
15
+ info: number;
16
+ broadcast: number;
17
+ reply: number;
18
+ map: number;
19
+ };
20
+ }) => React.JSX.Element;
21
+ export default Success;
@@ -0,0 +1,74 @@
1
+ import React, { useRef, useState } from 'react';
2
+ import Link from 'next/link';
3
+ import { NoResult } from './NoResult';
4
+ import uuid from 'react-uuid';
5
+ import { Title } from './Title';
6
+ import { ViewMore } from './ViewMore';
7
+ import { useTranslation } from 'next-i18next';
8
+ import { searchColorText } from '../../common/integrate';
9
+ const Success = (props) => {
10
+ var _a;
11
+ const { tab, onMoreViewText, list, pages, onMoreView, search, listCount } = props;
12
+ const [loading, setLoading] = useState(false);
13
+ const { t } = useTranslation('common');
14
+ const firstAddRef = useRef(null);
15
+ //
16
+ // useEffect(() => {
17
+ // if (list.successList.length > 12) firstAddRef.current?.focus();
18
+ // }, [list.successList]);
19
+ //
20
+ // useEffect(() => {
21
+ // if (tab === 'success') firstAddRef.current?.focus();
22
+ // }, [tab]);
23
+ return (<>
24
+ {tab === '전체' || tab === 'success' ? (tab === 'success' && listCount.success < 1 ? (<NoResult />) : (<>
25
+ {listCount.success > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
26
+ <Title title={'업무사례'} tab={tab} type={'success'} onClick={str => onMoreViewText(str)} count={listCount.success}/>
27
+
28
+ {((_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'}>
29
+ {(tab === '전체' ? list.successList.slice(0, 4) : list.successList).map((item, index) => {
30
+ var _a, _b;
31
+ return (<Link href={!item.center_code.includes('OF')
32
+ ? item.pathname + 'success_new/' + item.id
33
+ : `https://${item.office_pathname}/success_new/${item.id}`} target={item.center_code === props.center_code ? '' : '_blank'} className={' overflow-hidden border-[2px] border-solid border-[#ebebebcc]'} key={uuid()} ref={index === 0 ||
34
+ (index > 12 && index === list.successList.length - 12)
35
+ ? firstAddRef
36
+ : null}>
37
+ <p className={`ml-8 inline-block w-auto max-w-[70%] bg-[#2960A7] p-2 px-7 text-center text-[18px] font-[800] text-[#fff] max-lg:text-[16px] max-sm:text-[15px] max-2xs:text-[14px]`}>
38
+ <span className={'line-clamp-1'}>{item.sub}</span>
39
+ </p>
40
+ <div className={'flex flex-col gap-4 p-8 max-sm:pt-6'}>
41
+ <div className={'block flex-col items-center gap-[10px] sm:flex sm:flex-row'}>
42
+ <div className={'max-sm:mb-4'}>
43
+ <p className={` mb-3 flex h-[35px] w-[100px] flex-col items-center justify-center overflow-hidden rounded-[30px] bg-[#F2F6FA] text-center text-[16px] font-[800] leading-[18px] text-[#285FA7] max-sm:hidden max-sm:text-[15px] max-2xs:text-[14px] sm:mb-0 sm:h-[80px] sm:w-[80px] sm:rounded-full`}>
44
+ <span className={'line-clamp-2 break-keep px-3 text-center'}>
45
+ {item.result}
46
+ </span>
47
+ </p>
48
+
49
+ <data className={'mt-3 block text-[#666666] max-sm:hidden max-sm:text-[14px]'}>
50
+ {(_a = item.created_at) === null || _a === void 0 ? void 0 : _a.split('T')[0].replaceAll('-', '.')}
51
+ </data>
52
+ </div>
53
+
54
+ <p className={'mb-8 ml-1 text-[20px] max-xl:mb-4 max-lg:mb-2 max-lg:text-[18px] max-md:text-[15px] max-sm:mb-0 max-sm:text-[17px] sm:ml-4 '}>
55
+ {searchColorText(item.title, search)}
56
+ </p>
57
+ <p className={'mt-6 text-[#666666] max-sm:text-[14px] sm:hidden'}>
58
+ {(_b = item.created_at) === null || _b === void 0 ? void 0 : _b.split('T')[0].replaceAll('-', '.')}
59
+ </p>
60
+ </div>
61
+ </div>
62
+ </Link>);
63
+ })}
64
+ </div>)}
65
+ {tab != '전체' && (<ViewMore flag={list.successList.length != listCount.success} loading={loading} totalPage={Math.ceil(listCount.success / 12)} nowPage={pages.successList} func={() => {
66
+ setLoading(true);
67
+ onMoreView();
68
+ setLoading(false);
69
+ }}/>)}
70
+ </div>) : (<></>)}
71
+ </>)) : null}
72
+ </>);
73
+ };
74
+ export default Success;
@@ -0,0 +1,167 @@
1
+ import React, { useRef, useState } from 'react';
2
+ import Link from 'next/link';
3
+ import { NoResult } from './NoResult';
4
+ import uuid from 'react-uuid';
5
+ import { IListPagesType, IListTypes } from './integrateType';
6
+ import { Title } from './Title';
7
+ import { ViewMore } from './ViewMore';
8
+ import { useTranslation } from 'next-i18next';
9
+ import { searchColorText } from '../../common/integrate';
10
+
11
+ const Success = (props: {
12
+ tab: string;
13
+ onMoreViewText: (str: string) => void;
14
+ onMoreView: () => void;
15
+ list: IListTypes;
16
+ pages: IListPagesType;
17
+ center_code: string;
18
+ search: string;
19
+ listCount: {
20
+ lawyer: number;
21
+ field: number;
22
+ success: number;
23
+ info: number;
24
+ broadcast: number;
25
+ reply: number;
26
+ map: number;
27
+ };
28
+ }) => {
29
+ const { tab, onMoreViewText, list, pages, onMoreView, search, listCount } = props;
30
+
31
+ const [loading, setLoading] = useState<boolean>(false);
32
+
33
+ const { t } = useTranslation('common');
34
+ const firstAddRef = useRef<HTMLAnchorElement>(null);
35
+ //
36
+ // useEffect(() => {
37
+ // if (list.successList.length > 12) firstAddRef.current?.focus();
38
+ // }, [list.successList]);
39
+ //
40
+ // useEffect(() => {
41
+ // if (tab === 'success') firstAddRef.current?.focus();
42
+ // }, [tab]);
43
+
44
+ return (
45
+ <>
46
+ {tab === '전체' || tab === 'success' ? (
47
+ tab === 'success' && listCount.success < 1 ? (
48
+ <NoResult />
49
+ ) : (
50
+ <>
51
+ {listCount.success > 0 ? (
52
+ <div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
53
+ <Title
54
+ title={'업무사례'}
55
+ tab={tab}
56
+ type={'success'}
57
+ onClick={str => onMoreViewText(str)}
58
+ count={listCount.success}
59
+ />
60
+
61
+ {list.successList?.length !== 0 && (
62
+ <div className={'mb-9 mt-9 grid gap-[30px] sm:grid-cols-2'}>
63
+ {(tab === '전체' ? list.successList.slice(0, 4) : list.successList).map(
64
+ (item, index) => {
65
+ return (
66
+ <Link
67
+ href={
68
+ !item.center_code.includes('OF')
69
+ ? item.pathname + 'success_new/' + item.id
70
+ : `https://${item.office_pathname}/success_new/${item.id}`
71
+ }
72
+ target={item.center_code === props.center_code ? '' : '_blank'}
73
+ className={
74
+ ' overflow-hidden border-[2px] border-solid border-[#ebebebcc]'
75
+ }
76
+ key={uuid()}
77
+ ref={
78
+ index === 0 ||
79
+ (index > 12 && index === list.successList.length - 12)
80
+ ? firstAddRef
81
+ : null
82
+ }
83
+ >
84
+ <p
85
+ className={`ml-8 inline-block w-auto max-w-[70%] bg-[#2960A7] p-2 px-7 text-center text-[18px] font-[800] text-[#fff] max-lg:text-[16px] max-sm:text-[15px] max-2xs:text-[14px]`}
86
+ >
87
+ <span className={'line-clamp-1'}>{item.sub}</span>
88
+ </p>
89
+ <div className={'flex flex-col gap-4 p-8 max-sm:pt-6'}>
90
+ <div
91
+ className={
92
+ 'block flex-col items-center gap-[10px] sm:flex sm:flex-row'
93
+ }
94
+ >
95
+ <div className={'max-sm:mb-4'}>
96
+ <p
97
+ className={` mb-3 flex h-[35px] w-[100px] flex-col items-center justify-center overflow-hidden rounded-[30px] bg-[#F2F6FA] text-center text-[16px] font-[800] leading-[18px] text-[#285FA7] max-sm:hidden max-sm:text-[15px] max-2xs:text-[14px] sm:mb-0 sm:h-[80px] sm:w-[80px] sm:rounded-full`}
98
+ >
99
+ <span
100
+ className={
101
+ 'line-clamp-2 break-keep px-3 text-center'
102
+ }
103
+ >
104
+ {item.result}
105
+ </span>
106
+ </p>
107
+
108
+ <data
109
+ className={
110
+ 'mt-3 block text-[#666666] max-sm:hidden max-sm:text-[14px]'
111
+ }
112
+ >
113
+ {item.created_at
114
+ ?.split('T')[0]
115
+ .replaceAll('-', '.')}
116
+ </data>
117
+ </div>
118
+
119
+ <p
120
+ className={
121
+ 'mb-8 ml-1 text-[20px] max-xl:mb-4 max-lg:mb-2 max-lg:text-[18px] max-md:text-[15px] max-sm:mb-0 max-sm:text-[17px] sm:ml-4 '
122
+ }
123
+ >
124
+ {searchColorText(item.title, search)}
125
+ </p>
126
+ <p
127
+ className={
128
+ 'mt-6 text-[#666666] max-sm:text-[14px] sm:hidden'
129
+ }
130
+ >
131
+ {item.created_at
132
+ ?.split('T')[0]
133
+ .replaceAll('-', '.')}
134
+ </p>
135
+ </div>
136
+ </div>
137
+ </Link>
138
+ );
139
+ }
140
+ )}
141
+ </div>
142
+ )}
143
+ {tab != '전체' && (
144
+ <ViewMore
145
+ flag={list.successList.length != listCount.success}
146
+ loading={loading}
147
+ totalPage={Math.ceil(listCount.success / 12)}
148
+ nowPage={pages.successList}
149
+ func={() => {
150
+ setLoading(true);
151
+ onMoreView();
152
+ setLoading(false);
153
+ }}
154
+ />
155
+ )}
156
+ </div>
157
+ ) : (
158
+ <></>
159
+ )}
160
+ </>
161
+ )
162
+ ) : null}
163
+ </>
164
+ );
165
+ };
166
+
167
+ export default Success;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export declare const Title: (props: {
3
+ title: string;
4
+ onClick: (str: string) => void;
5
+ count: number;
6
+ tab: string;
7
+ type: string;
8
+ noUnderBorder?: boolean;
9
+ noMoreView?: boolean;
10
+ }) => React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import Image from 'next/image';
2
+ import React from 'react';
3
+ export const Title = (props) => {
4
+ return (<div className={`mb-6 w-full font-semibold`}>
5
+ <div className={'mb-[18px] flex items-center justify-between'}>
6
+ <p className={'text-[36px] max-lg:text-[30px] max-sm:text-[26px]'}>
7
+ {props.title}
8
+
9
+ {props.count < 10 ? (<></>) : (<span className={'ml-2 text-[28px] text-[#285FA7] max-lg:text-[26px] max-sm:text-[22px]'}>
10
+ ({props.count.toLocaleString()})
11
+ </span>)}
12
+ </p>
13
+ {props.tab === '전체' && !props.noMoreView && (<button tabIndex={0} className={'flex cursor-pointer items-center justify-between text-black sm:mt-3 lg:mt-6 xl:mt-7 '} onClick={() => {
14
+ props.onClick(props.type);
15
+ }} onKeyDown={(e) => {
16
+ if (e.key === 'Enter') {
17
+ props.onClick(props.type);
18
+ }
19
+ }} aria-label={`${props.title === '오시는길' ? '오시는길 페이지로 이동' : props.title + ' 더보기'}`}>
20
+ <span className={'mt-[1px] max-sm:hidden'}>더보기</span>
21
+ <Image src={'/images/integrate/right.webp'} alt={''} title={''} width={30} height={30} className={'ml-3 h-[14px] w-[22px]'}/>
22
+ </button>)}
23
+ </div>
24
+ <div className={'border-b-[2px] border-solid border-[#B5B5B5] ' + `${props.noUnderBorder ? 'hidden' : ''}`}></div>
25
+ </div>);
26
+ };
27
+ // mt-[180px] max-sm:mt-[100px] max-xs:mt-[50px]
@@ -0,0 +1,62 @@
1
+ import Image from 'next/image';
2
+ import React from 'react';
3
+
4
+ export const Title = (props: {
5
+ title: string;
6
+ onClick: (str: string) => void;
7
+ count: number;
8
+ tab: string;
9
+ type: string;
10
+ noUnderBorder?: boolean; //밑줄삭제
11
+ noMoreView?: boolean; //더보기버튼 삭제
12
+ }) => {
13
+ return (
14
+ <div className={`mb-6 w-full font-semibold`}>
15
+ <div className={'mb-[18px] flex items-center justify-between'}>
16
+ <p className={'text-[36px] max-lg:text-[30px] max-sm:text-[26px]'}>
17
+ {props.title}
18
+
19
+ {props.count < 10 ? (
20
+ <></>
21
+ ) : (
22
+ <span className={'ml-2 text-[28px] text-[#285FA7] max-lg:text-[26px] max-sm:text-[22px]'}>
23
+ ({props.count.toLocaleString()})
24
+ </span>
25
+ )}
26
+ </p>
27
+ {props.tab === '전체' && !props.noMoreView && (
28
+ <button
29
+ tabIndex={0}
30
+ className={
31
+ 'flex cursor-pointer items-center justify-between text-black sm:mt-3 lg:mt-6 xl:mt-7 '
32
+ }
33
+ onClick={() => {
34
+ props.onClick(props.type);
35
+ }}
36
+ onKeyDown={(e: any) => {
37
+ if (e.key === 'Enter') {
38
+ props.onClick(props.type);
39
+ }
40
+ }}
41
+ aria-label={`${props.title === '오시는길' ? '오시는길 페이지로 이동' : props.title + ' 더보기'}`}
42
+ >
43
+ <span className={'mt-[1px] max-sm:hidden'}>더보기</span>
44
+ <Image
45
+ src={'/images/integrate/right.webp'}
46
+ alt={''}
47
+ title={''}
48
+ width={30}
49
+ height={30}
50
+ className={'ml-3 h-[14px] w-[22px]'}
51
+ />
52
+ </button>
53
+ )}
54
+ </div>
55
+ <div
56
+ className={'border-b-[2px] border-solid border-[#B5B5B5] ' + `${props.noUnderBorder ? 'hidden' : ''}`}
57
+ ></div>
58
+ </div>
59
+ );
60
+ };
61
+
62
+ // mt-[180px] max-sm:mt-[100px] max-xs:mt-[50px]
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const ViewMore: (props: {
3
+ func: () => void;
4
+ loading: boolean;
5
+ flag: boolean;
6
+ totalPage?: number;
7
+ nowPage?: number;
8
+ label?: string;
9
+ }) => React.JSX.Element;