@daeryun/dr_components 0.4.56 → 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.
- package/dist/components/page/Integrate/Lawyer.jsx +2 -3
- package/dist/components/page/Integrate/Lawyer.tsx +2 -5
- package/dist/components/page/Integrate/Map.jsx +4 -5
- package/dist/components/page/Integrate/Map.tsx +4 -8
- package/dist/components/page/Integrate/SearchData.jsx +8 -5
- package/dist/components/page/Integrate/SearchData.tsx +8 -5
- package/dist/components/page/Integrate/Title.jsx +7 -3
- package/dist/components/page/Integrate/Title.tsx +8 -3
- package/dist/components/page/Integrate/ViewMore.jsx +13 -13
- package/dist/components/page/Integrate/ViewMore.tsx +37 -40
- package/dist/styles/globals.css +5 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { NoResult } from './NoResult';
|
|
|
3
3
|
import { Title } from './Title';
|
|
4
4
|
import { ViewMore } from './ViewMore';
|
|
5
5
|
import mobile from 'is-mobile';
|
|
6
|
-
import { useRouter } from 'next/
|
|
6
|
+
import { useRouter } from 'next/navigation';
|
|
7
7
|
import Link from 'next/link';
|
|
8
8
|
import Image from 'next/image';
|
|
9
9
|
import style from './index.module.css';
|
|
@@ -97,8 +97,7 @@ const LawyerContainer = (props) => {
|
|
|
97
97
|
</Link>
|
|
98
98
|
<div className={'m-3 flex h-full flex-col justify-between'}>
|
|
99
99
|
<Link href={{
|
|
100
|
-
pathname: '/lawyer/' + item.id
|
|
101
|
-
query: Object.assign({}, router.query)
|
|
100
|
+
pathname: '/lawyer/' + item.id
|
|
102
101
|
}}>
|
|
103
102
|
<span>
|
|
104
103
|
<div className={'flex items-center justify-between'}>
|
|
@@ -4,7 +4,7 @@ import { Title } from './Title';
|
|
|
4
4
|
import { ILawyerTypes, IListPagesType, IListTypes } from './integrateType';
|
|
5
5
|
import { ViewMore } from './ViewMore';
|
|
6
6
|
import mobile from 'is-mobile';
|
|
7
|
-
import { useRouter } from 'next/
|
|
7
|
+
import { useRouter } from 'next/navigation';
|
|
8
8
|
import Link from 'next/link';
|
|
9
9
|
import Image from 'next/image';
|
|
10
10
|
import style from './index.module.css';
|
|
@@ -205,10 +205,7 @@ const LawyerContainer = (props: {
|
|
|
205
205
|
<div className={'m-3 flex h-full flex-col justify-between'}>
|
|
206
206
|
<Link
|
|
207
207
|
href={{
|
|
208
|
-
pathname: '/lawyer/' + item.id
|
|
209
|
-
query: {
|
|
210
|
-
...router.query
|
|
211
|
-
}
|
|
208
|
+
pathname: '/lawyer/' + item.id
|
|
212
209
|
}}
|
|
213
210
|
>
|
|
214
211
|
<span>
|
|
@@ -3,7 +3,7 @@ import Image from 'next/image';
|
|
|
3
3
|
import { NoResult } from './NoResult';
|
|
4
4
|
import { Title } from './Title';
|
|
5
5
|
import { ViewMore } from './ViewMore';
|
|
6
|
-
import { useRouter } from 'next/
|
|
6
|
+
import { useRouter } from 'next/navigation';
|
|
7
7
|
import { searchColorText } from '../../common/integrate';
|
|
8
8
|
const Map = (props) => {
|
|
9
9
|
const router = useRouter();
|
|
@@ -48,7 +48,6 @@ const Map = (props) => {
|
|
|
48
48
|
? allTabList
|
|
49
49
|
: list.mapList.slice(0, 5)
|
|
50
50
|
: list.mapList).map((item, index) => {
|
|
51
|
-
var _a, _b, _c;
|
|
52
51
|
return (<div key={'integrate_map' + item.key} className={'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
|
|
53
52
|
//1280px
|
|
54
53
|
'max-xl:gap-[0] ' +
|
|
@@ -95,17 +94,17 @@ const Map = (props) => {
|
|
|
95
94
|
<span className={'grow ' +
|
|
96
95
|
//640px
|
|
97
96
|
'max-sm:hidden'}>
|
|
98
|
-
<MapInfoCon locale={
|
|
97
|
+
<MapInfoCon locale={'ko'} title={'주소'} text={<>
|
|
99
98
|
{item.address
|
|
100
99
|
.replaceAll('법무법인(유한)대륜', '')
|
|
101
100
|
.replaceAll('법무법인(유한) 대륜', '')}
|
|
102
101
|
</>}/>
|
|
103
|
-
<MapInfoCon locale={
|
|
102
|
+
<MapInfoCon locale={'ko'} title={'업무시간'} text={<>
|
|
104
103
|
{item.worktime.split(' | ').map((i, index) => (<span key={item.key + '_work_time_' + index} className={'block'}>
|
|
105
104
|
{i}
|
|
106
105
|
</span>))}
|
|
107
106
|
</>}/>
|
|
108
|
-
<MapInfoCon locale={
|
|
107
|
+
<MapInfoCon locale={'ko'} title={'대표번호'} text={<>{item.tel}</>}/>
|
|
109
108
|
</span>
|
|
110
109
|
</div>);
|
|
111
110
|
})}
|
|
@@ -5,7 +5,7 @@ import { useTranslation } from 'next-i18next';
|
|
|
5
5
|
import { NoResult } from './NoResult';
|
|
6
6
|
import { Title } from './Title';
|
|
7
7
|
import { ViewMore } from './ViewMore';
|
|
8
|
-
import { useRouter } from 'next/
|
|
8
|
+
import { useRouter } from 'next/navigation';
|
|
9
9
|
import { searchColorText } from '../../common/integrate';
|
|
10
10
|
|
|
11
11
|
const Map = (props: {
|
|
@@ -175,7 +175,7 @@ const Map = (props: {
|
|
|
175
175
|
}
|
|
176
176
|
>
|
|
177
177
|
<MapInfoCon
|
|
178
|
-
locale={
|
|
178
|
+
locale={'ko'}
|
|
179
179
|
title={'주소'}
|
|
180
180
|
text={
|
|
181
181
|
<>
|
|
@@ -186,7 +186,7 @@ const Map = (props: {
|
|
|
186
186
|
}
|
|
187
187
|
/>
|
|
188
188
|
<MapInfoCon
|
|
189
|
-
locale={
|
|
189
|
+
locale={'ko'}
|
|
190
190
|
title={'업무시간'}
|
|
191
191
|
text={
|
|
192
192
|
<>
|
|
@@ -201,11 +201,7 @@ const Map = (props: {
|
|
|
201
201
|
</>
|
|
202
202
|
}
|
|
203
203
|
/>
|
|
204
|
-
<MapInfoCon
|
|
205
|
-
locale={router.locale ?? ''}
|
|
206
|
-
title={'대표번호'}
|
|
207
|
-
text={<>{item.tel}</>}
|
|
208
|
-
/>
|
|
204
|
+
<MapInfoCon locale={'ko'} title={'대표번호'} text={<>{item.tel}</>} />
|
|
209
205
|
</span>
|
|
210
206
|
</div>
|
|
211
207
|
);
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
import React, { useState, useEffect } from 'react';
|
|
12
12
|
import { NoResult } from './NoResult';
|
|
13
13
|
import { searchInit } from './integrateType';
|
|
14
|
-
import { useRouter } from 'next/
|
|
14
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
15
15
|
import Field from './Field';
|
|
16
16
|
import Success from './Success';
|
|
17
17
|
import LawInfo from './LawInfo';
|
|
@@ -28,6 +28,9 @@ const SearchData = ({ list: propsList, totalCount, listCount, center_code, crime
|
|
|
28
28
|
const [list, setList] = useState(searchInit.list);
|
|
29
29
|
const [pages, setPages] = useState(searchInit.pages);
|
|
30
30
|
const [isMobileSize, setIsMobileSize] = useState(null);
|
|
31
|
+
const searchParams = useSearchParams();
|
|
32
|
+
const querySearch = searchParams.get('search');
|
|
33
|
+
const queryTab = searchParams.get('tab');
|
|
31
34
|
const handleMoreView = (key, data) => {
|
|
32
35
|
// @ts-ignore
|
|
33
36
|
setPages(Object.assign(Object.assign({}, pages), { [key]: pages[key] + 1 }));
|
|
@@ -35,16 +38,16 @@ const SearchData = ({ list: propsList, totalCount, listCount, center_code, crime
|
|
|
35
38
|
setList(Object.assign(Object.assign({}, list), { [key]: [...list[key], ...data] }));
|
|
36
39
|
};
|
|
37
40
|
const handleMoreViewText = (tab) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
-
yield router.push(`/integrate?search=${
|
|
41
|
+
yield router.push(`/integrate?search=${querySearch}&tab=${tab}`);
|
|
39
42
|
});
|
|
40
43
|
useEffect(() => {
|
|
41
44
|
setList(propsList);
|
|
42
45
|
}, [propsList]);
|
|
43
46
|
useEffect(() => {
|
|
44
|
-
setSearch(String(
|
|
45
|
-
setTab(String(
|
|
47
|
+
setSearch(String(querySearch));
|
|
48
|
+
setTab(String(queryTab));
|
|
46
49
|
// setPages(searchInit.pages)
|
|
47
|
-
}, [
|
|
50
|
+
}, [searchParams]);
|
|
48
51
|
//브라우저 체크
|
|
49
52
|
useEffect(() => {
|
|
50
53
|
if (width != 0 && width < 641 && isMobileSize != true) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import { NoResult } from './NoResult';
|
|
5
5
|
import { IListPagesType, IListTypes, searchInit } from './integrateType';
|
|
6
|
-
import { useRouter } from 'next/
|
|
6
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
7
7
|
import Field from './Field';
|
|
8
8
|
import Success from './Success';
|
|
9
9
|
import LawInfo from './LawInfo';
|
|
@@ -42,6 +42,9 @@ const SearchData = ({
|
|
|
42
42
|
const [pages, setPages] = useState<IListPagesType>(searchInit.pages);
|
|
43
43
|
const [isMobileSize, setIsMobileSize] = useState<boolean | null>(null);
|
|
44
44
|
|
|
45
|
+
const searchParams = useSearchParams();
|
|
46
|
+
const querySearch = searchParams.get('search');
|
|
47
|
+
const queryTab = searchParams.get('tab');
|
|
45
48
|
const handleMoreView = (key: string, data: any[]) => {
|
|
46
49
|
// @ts-ignore
|
|
47
50
|
setPages({ ...pages, [key]: pages[key] + 1 });
|
|
@@ -50,7 +53,7 @@ const SearchData = ({
|
|
|
50
53
|
};
|
|
51
54
|
|
|
52
55
|
const handleMoreViewText = async (tab: any) => {
|
|
53
|
-
await router.push(`/integrate?search=${
|
|
56
|
+
await router.push(`/integrate?search=${querySearch}&tab=${tab}`);
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
useEffect(() => {
|
|
@@ -58,10 +61,10 @@ const SearchData = ({
|
|
|
58
61
|
}, [propsList]);
|
|
59
62
|
|
|
60
63
|
useEffect(() => {
|
|
61
|
-
setSearch(String(
|
|
62
|
-
setTab(String(
|
|
64
|
+
setSearch(String(querySearch));
|
|
65
|
+
setTab(String(queryTab));
|
|
63
66
|
// setPages(searchInit.pages)
|
|
64
|
-
}, [
|
|
67
|
+
}, [searchParams]);
|
|
65
68
|
|
|
66
69
|
//브라우저 체크
|
|
67
70
|
useEffect(() => {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
3
5
|
export const Title = (props) => {
|
|
6
|
+
const searchParams = useSearchParams();
|
|
7
|
+
const querySearch = searchParams.get('search');
|
|
4
8
|
return (<div className={`mb-6 w-full font-semibold`}>
|
|
5
9
|
<div className={'mb-[18px] flex items-center justify-between'}>
|
|
6
10
|
<p className={'text-[36px] max-lg:text-[30px] max-sm:text-[26px]'}>
|
|
@@ -10,16 +14,16 @@ export const Title = (props) => {
|
|
|
10
14
|
({props.count.toLocaleString()})
|
|
11
15
|
</span>)}
|
|
12
16
|
</p>
|
|
13
|
-
{props.tab === '전체' && !props.noMoreView && (<
|
|
17
|
+
{props.tab === '전체' && !props.noMoreView && (<Link href={`/integrate?search=${querySearch}&tab=${props.type}`} tabIndex={0} className={'flex cursor-pointer items-center justify-between text-black sm:mt-3 lg:mt-6 xl:mt-7 '} onClick={() => {
|
|
14
18
|
props.onClick(props.type);
|
|
15
19
|
}} onKeyDown={(e) => {
|
|
16
20
|
if (e.key === 'Enter') {
|
|
17
21
|
props.onClick(props.type);
|
|
18
22
|
}
|
|
19
|
-
}}
|
|
23
|
+
}}>
|
|
20
24
|
<span className={'mt-[1px] max-sm:hidden'}>더보기</span>
|
|
21
25
|
<Image src={'/images/integrate/right.webp'} alt={''} title={''} width={30} height={30} className={'ml-3 h-[14px] w-[22px]'}/>
|
|
22
|
-
</
|
|
26
|
+
</Link>)}
|
|
23
27
|
</div>
|
|
24
28
|
<div className={'border-b-[2px] border-solid border-[#B5B5B5] ' + `${props.noUnderBorder ? 'hidden' : ''}`}></div>
|
|
25
29
|
</div>);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
3
5
|
|
|
4
6
|
export const Title = (props: {
|
|
5
7
|
title: string;
|
|
@@ -10,6 +12,9 @@ export const Title = (props: {
|
|
|
10
12
|
noUnderBorder?: boolean; //밑줄삭제
|
|
11
13
|
noMoreView?: boolean; //더보기버튼 삭제
|
|
12
14
|
}) => {
|
|
15
|
+
const searchParams = useSearchParams();
|
|
16
|
+
const querySearch = searchParams.get('search');
|
|
17
|
+
|
|
13
18
|
return (
|
|
14
19
|
<div className={`mb-6 w-full font-semibold`}>
|
|
15
20
|
<div className={'mb-[18px] flex items-center justify-between'}>
|
|
@@ -25,7 +30,8 @@ export const Title = (props: {
|
|
|
25
30
|
)}
|
|
26
31
|
</p>
|
|
27
32
|
{props.tab === '전체' && !props.noMoreView && (
|
|
28
|
-
<
|
|
33
|
+
<Link
|
|
34
|
+
href={`/integrate?search=${querySearch}&tab=${props.type}`}
|
|
29
35
|
tabIndex={0}
|
|
30
36
|
className={
|
|
31
37
|
'flex cursor-pointer items-center justify-between text-black sm:mt-3 lg:mt-6 xl:mt-7 '
|
|
@@ -38,7 +44,6 @@ export const Title = (props: {
|
|
|
38
44
|
props.onClick(props.type);
|
|
39
45
|
}
|
|
40
46
|
}}
|
|
41
|
-
aria-label={`${props.title === '오시는길' ? '오시는길 페이지로 이동' : props.title + ' 더보기'}`}
|
|
42
47
|
>
|
|
43
48
|
<span className={'mt-[1px] max-sm:hidden'}>더보기</span>
|
|
44
49
|
<Image
|
|
@@ -49,7 +54,7 @@ export const Title = (props: {
|
|
|
49
54
|
height={30}
|
|
50
55
|
className={'ml-3 h-[14px] w-[22px]'}
|
|
51
56
|
/>
|
|
52
|
-
</
|
|
57
|
+
</Link>
|
|
53
58
|
)}
|
|
54
59
|
</div>
|
|
55
60
|
<div
|
|
@@ -3,26 +3,26 @@ import React from 'react';
|
|
|
3
3
|
import Loader from '../../Loader/Loader';
|
|
4
4
|
export const ViewMore = (props) => {
|
|
5
5
|
const { func, loading, flag, totalPage, nowPage, label = '' } = props;
|
|
6
|
-
const isNotLastPage = nowPage && totalPage ? nowPage - 1 !== totalPage : false;
|
|
7
6
|
const labelTxt = `${label} 글 더보기${nowPage && totalPage ? ` ${totalPage}페이지 중 ${nowPage - 1}페이지` : ''}`;
|
|
8
7
|
return (<>
|
|
9
|
-
{loading ? (<b className={'mb-20 text-center'}>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
{flag ? (loading ? (<b className={'mb-20 text-center'}>
|
|
9
|
+
<Loader />
|
|
10
|
+
</b>) : (<button aria-label={labelTxt} className={(nowPage && totalPage ? ' px-5 ' : ' px-10 ') +
|
|
11
|
+
'relative m-auto mb-20 mt-20 flex w-[10em] cursor-pointer items-center justify-between border-[1px] border-solid border-[#707070] py-4 text-[#666666] '} onKeyDown={(e) => {
|
|
13
12
|
if (e.key === 'Enter') {
|
|
14
13
|
func();
|
|
15
14
|
}
|
|
16
15
|
}} onClick={() => {
|
|
17
16
|
func();
|
|
18
17
|
}}>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
<p className={'pt-[2px] leading-[15px] text-[#666666] '}>
|
|
19
|
+
더보기
|
|
20
|
+
{nowPage && totalPage ? (<span>
|
|
21
|
+
{nowPage - 1}/{totalPage}{' '}
|
|
22
|
+
</span>) : (<></>)}
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<Image src={'/images/plus_g.webp'} alt={''} width={44} height={44} className={'h-auto w-[18px] max-lg:w-[16px] max-sm:w-[15px] max-2xs:w-[13px]'}/>
|
|
26
|
+
</button>)) : null}
|
|
27
27
|
</>);
|
|
28
28
|
};
|
|
@@ -12,55 +12,52 @@ export const ViewMore = (props: {
|
|
|
12
12
|
}) => {
|
|
13
13
|
const { func, loading, flag, totalPage, nowPage, label = '' } = props;
|
|
14
14
|
|
|
15
|
-
const isNotLastPage = nowPage && totalPage ? nowPage - 1 !== totalPage : false;
|
|
16
|
-
|
|
17
15
|
const labelTxt = `${label} 글 더보기${nowPage && totalPage ? ` ${totalPage}페이지 중 ${nowPage - 1}페이지` : ''}`;
|
|
18
16
|
|
|
19
17
|
return (
|
|
20
18
|
<>
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
onKeyDown={(e: any) => {
|
|
33
|
-
if (e.key === 'Enter') {
|
|
34
|
-
func();
|
|
19
|
+
{flag ? (
|
|
20
|
+
loading ? (
|
|
21
|
+
<b className={'mb-20 text-center'}>
|
|
22
|
+
<Loader />
|
|
23
|
+
</b>
|
|
24
|
+
) : (
|
|
25
|
+
<button
|
|
26
|
+
aria-label={labelTxt}
|
|
27
|
+
className={
|
|
28
|
+
(nowPage && totalPage ? ' px-5 ' : ' px-10 ') +
|
|
29
|
+
'relative m-auto mb-20 mt-20 flex w-[10em] cursor-pointer items-center justify-between border-[1px] border-solid border-[#707070] py-4 text-[#666666] '
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
onKeyDown={(e: any) => {
|
|
32
|
+
if (e.key === 'Enter') {
|
|
33
|
+
func();
|
|
34
|
+
}
|
|
35
|
+
}}
|
|
36
|
+
onClick={() => {
|
|
37
|
+
func();
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
<p className={'pt-[2px] leading-[15px] text-[#666666] '}>
|
|
41
|
+
더보기
|
|
42
|
+
{nowPage && totalPage ? (
|
|
43
|
+
<span>
|
|
44
|
+
{nowPage - 1}/{totalPage}{' '}
|
|
45
|
+
</span>
|
|
46
|
+
) : (
|
|
47
|
+
<></>
|
|
48
|
+
)}
|
|
49
|
+
</p>
|
|
50
|
+
|
|
52
51
|
<Image
|
|
53
52
|
src={'/images/plus_g.webp'}
|
|
54
53
|
alt={''}
|
|
55
|
-
width={
|
|
56
|
-
height={
|
|
57
|
-
className={'
|
|
54
|
+
width={44}
|
|
55
|
+
height={44}
|
|
56
|
+
className={'h-auto w-[18px] max-lg:w-[16px] max-sm:w-[15px] max-2xs:w-[13px]'}
|
|
58
57
|
/>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</button>
|
|
63
|
-
)}
|
|
58
|
+
</button>
|
|
59
|
+
)
|
|
60
|
+
) : null}
|
|
64
61
|
</>
|
|
65
62
|
);
|
|
66
63
|
};
|