@daeryun/dr_components 0.5.65 → 0.5.67
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/Header/PcHeader.d.ts +2 -1
- package/dist/components/Header/PcHeader.jsx +2 -2
- package/dist/components/Header/PcHeader.stories.jsx +1 -0
- package/dist/components/Header/PcHeader.stories.tsx +1 -0
- package/dist/components/Header/PcHeader.tsx +3 -1
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +1 -1
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +1 -1
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +11 -3
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +40 -13
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IRoute } from '../common';
|
|
2
|
-
declare const PcHeader: ({ isNotSubPage, pcRoutes, isTextWhite, isBgOpacityZero, isBgGray, handleMenuToggle, centerName }: {
|
|
2
|
+
declare const PcHeader: ({ isNotSubPage, pcRoutes, isTextWhite, isBgOpacityZero, isBgGray, isBgWhite, handleMenuToggle, centerName }: {
|
|
3
3
|
isNotSubPage?: boolean;
|
|
4
4
|
pcRoutes: IRoute[];
|
|
5
5
|
isTextWhite: boolean;
|
|
6
|
+
isBgWhite: boolean;
|
|
6
7
|
isBgGray: boolean;
|
|
7
8
|
isBgOpacityZero: boolean;
|
|
8
9
|
handleMenuToggle: (url?: string | undefined) => void;
|
|
@@ -18,7 +18,7 @@ import SearchBlack from '../../asset/images/header/search_black.webp';
|
|
|
18
18
|
import MenuWhite from '../../asset/images/header/h_menu.webp';
|
|
19
19
|
import MenuBlack from '../../asset/images/header/h_menu_b.webp';
|
|
20
20
|
import IconNewLink from '../../asset/images/header/head_link.svg';
|
|
21
|
-
const PcHeader = ({ isNotSubPage, pcRoutes, isTextWhite, isBgOpacityZero, isBgGray, handleMenuToggle, centerName }) => {
|
|
21
|
+
const PcHeader = ({ isNotSubPage, pcRoutes, isTextWhite, isBgOpacityZero, isBgGray, isBgWhite, handleMenuToggle, centerName }) => {
|
|
22
22
|
const router = useRouter();
|
|
23
23
|
const pathname = usePathname();
|
|
24
24
|
const [isHover, setIsHover] = useState(false);
|
|
@@ -48,7 +48,7 @@ const PcHeader = ({ isNotSubPage, pcRoutes, isTextWhite, isBgOpacityZero, isBgGr
|
|
|
48
48
|
{/*상단 배경*/}
|
|
49
49
|
<div className={'z-1 absolute left-0 top-0 h-[80px] w-full transition-colors duration-300 ' +
|
|
50
50
|
`${isBgGray || isHover ? 'bg-[#545454] bg-opacity-90 ' : ''}` +
|
|
51
|
-
`${
|
|
51
|
+
`${isBgWhite && !isHover ? 'bg-white ' : ''}` +
|
|
52
52
|
`${!isBgOpacityZero && !isHover ? 'bg-opacity-0 ' : ''}`}/>
|
|
53
53
|
{/*하단배경 (세부 nav)*/}
|
|
54
54
|
<div className={'z-1 absolute bottom-0 left-0 h-[calc(100%-80px)] w-full transition-colors duration-300 ' +
|
|
@@ -19,12 +19,14 @@ const PcHeader = ({
|
|
|
19
19
|
isTextWhite,
|
|
20
20
|
isBgOpacityZero,
|
|
21
21
|
isBgGray,
|
|
22
|
+
isBgWhite,
|
|
22
23
|
handleMenuToggle,
|
|
23
24
|
centerName
|
|
24
25
|
}: {
|
|
25
26
|
isNotSubPage?: boolean;
|
|
26
27
|
pcRoutes: IRoute[];
|
|
27
28
|
isTextWhite: boolean;
|
|
29
|
+
isBgWhite: boolean;
|
|
28
30
|
isBgGray: boolean;
|
|
29
31
|
isBgOpacityZero: boolean;
|
|
30
32
|
handleMenuToggle: (url?: string | undefined) => void;
|
|
@@ -70,7 +72,7 @@ const PcHeader = ({
|
|
|
70
72
|
className={
|
|
71
73
|
'z-1 absolute left-0 top-0 h-[80px] w-full transition-colors duration-300 ' +
|
|
72
74
|
`${isBgGray || isHover ? 'bg-[#545454] bg-opacity-90 ' : ''}` +
|
|
73
|
-
`${
|
|
75
|
+
`${isBgWhite && !isHover ? 'bg-white ' : ''}` +
|
|
74
76
|
`${!isBgOpacityZero && !isHover ? 'bg-opacity-0 ' : ''}`
|
|
75
77
|
}
|
|
76
78
|
/>
|
|
@@ -2495,7 +2495,7 @@ const lawyerData = {
|
|
|
2495
2495
|
const lawyerData2 = {
|
|
2496
2496
|
centerCode: 'CT0001',
|
|
2497
2497
|
lawyerInfo: {
|
|
2498
|
-
l_id: '
|
|
2498
|
+
l_id: 'tmp_20250305050551',
|
|
2499
2499
|
l_name: '송진성',
|
|
2500
2500
|
l_name_en: 'JinSung SONG',
|
|
2501
2501
|
l_ability: '대법원 재판연구관 민사조 의료담당 경력\n의사 자격 보유 변호사',
|
|
@@ -2509,7 +2509,7 @@ const lawyerData = {
|
|
|
2509
2509
|
const lawyerData2 = {
|
|
2510
2510
|
centerCode: 'CT0001',
|
|
2511
2511
|
lawyerInfo: {
|
|
2512
|
-
l_id: '
|
|
2512
|
+
l_id: 'tmp_20250305050551',
|
|
2513
2513
|
l_name: '송진성',
|
|
2514
2514
|
l_name_en: 'JinSung SONG',
|
|
2515
2515
|
l_ability: '대법원 재판연구관 민사조 의료담당 경력\n의사 자격 보유 변호사',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { insert } from '../../../../lib/conversion';
|
|
5
5
|
import * as gtag from '../../../../lib/gtag';
|
|
6
6
|
import mobile from 'is-mobile';
|
|
@@ -13,6 +13,9 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
13
13
|
const [isMobile, setIsMobile] = useState(false);
|
|
14
14
|
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
15
15
|
const [cssFlag, setCssFlag] = useState(false);
|
|
16
|
+
const isEven = useMemo(() => {
|
|
17
|
+
return Number(lawyerInfo.l_id.replace('tmp_', '')) % 2 === 0;
|
|
18
|
+
}, [lawyerInfo]);
|
|
16
19
|
const handleOnClickLawyerTel = () => {
|
|
17
20
|
if (isMobile) {
|
|
18
21
|
insert('lawyer_tel', isMobile);
|
|
@@ -54,8 +57,13 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
54
57
|
<Container isUseWrapper={isUseWrapper}>
|
|
55
58
|
<div className={'relative mx-auto h-[630px] max-xl:h-[580px] max-lg:h-[500px] max-md2:h-[450px] max-md:w-full max-xs:h-[360px] ' +
|
|
56
59
|
(isUseWrapper ? '' : ' w-[90%] ')}>
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
{isEven ? (<>
|
|
61
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'}/>
|
|
62
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
|
|
63
|
+
</>) : (<>
|
|
64
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc2.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'} unoptimized/>
|
|
65
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo2.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
|
|
66
|
+
</>)}
|
|
59
67
|
{/*변호사 이미지*/}
|
|
60
68
|
<div className={'absolute bottom-0 left-[50px] h-[569px] w-[515px] overflow-hidden max-xl:h-[510px] max-lg:h-[450px] max-md:left-1/2 max-md:h-[400px] max-md:-translate-x-1/2 max-xs:h-[317px] max-xs:w-[286px]'}>
|
|
61
69
|
<Image src={`${lawyerImagePath}/${lawyerInfo.nukki}`} alt={lawyerInfo.l_name + ' 변호사'} title={lawyerInfo.l_name + ' 변호사'} unoptimized={true} priority={true} sizes="(max-width: 700px)" fill className={'translate-y-7 scale-110 object-contain max-xl:translate-y-5 max-md:object-center max-xs:translate-y-3'}/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { insert } from '../../../../lib/conversion';
|
|
5
5
|
import * as gtag from '../../../../lib/gtag';
|
|
6
6
|
import mobile from 'is-mobile';
|
|
@@ -26,6 +26,9 @@ const BasicInfo = ({
|
|
|
26
26
|
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
27
27
|
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
28
28
|
const [cssFlag, setCssFlag] = useState<boolean>(false);
|
|
29
|
+
const isEven = useMemo(() => {
|
|
30
|
+
return Number(lawyerInfo.l_id.replace('tmp_', '')) % 2 === 0;
|
|
31
|
+
}, [lawyerInfo]);
|
|
29
32
|
|
|
30
33
|
const handleOnClickLawyerTel = () => {
|
|
31
34
|
if (isMobile) {
|
|
@@ -82,18 +85,42 @@ const BasicInfo = ({
|
|
|
82
85
|
(isUseWrapper ? '' : ' w-[90%] ')
|
|
83
86
|
}
|
|
84
87
|
>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
{isEven ? (
|
|
89
|
+
<>
|
|
90
|
+
<Image
|
|
91
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc.webp'}
|
|
92
|
+
alt={'변호사 리스트 배경'}
|
|
93
|
+
fill
|
|
94
|
+
quality={100}
|
|
95
|
+
className={'object-cover max-sm:hidden'}
|
|
96
|
+
/>
|
|
97
|
+
<Image
|
|
98
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo.webp'}
|
|
99
|
+
alt={'변호사 리스트 배경'}
|
|
100
|
+
fill
|
|
101
|
+
quality={100}
|
|
102
|
+
className={'object-cover sm:hidden'}
|
|
103
|
+
/>
|
|
104
|
+
</>
|
|
105
|
+
) : (
|
|
106
|
+
<>
|
|
107
|
+
<Image
|
|
108
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc2.webp'}
|
|
109
|
+
alt={'변호사 리스트 배경'}
|
|
110
|
+
fill
|
|
111
|
+
quality={100}
|
|
112
|
+
className={'object-cover max-sm:hidden'}
|
|
113
|
+
unoptimized
|
|
114
|
+
/>
|
|
115
|
+
<Image
|
|
116
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo2.webp'}
|
|
117
|
+
alt={'변호사 리스트 배경'}
|
|
118
|
+
fill
|
|
119
|
+
quality={100}
|
|
120
|
+
className={'object-cover sm:hidden'}
|
|
121
|
+
/>
|
|
122
|
+
</>
|
|
123
|
+
)}
|
|
97
124
|
{/*변호사 이미지*/}
|
|
98
125
|
<div
|
|
99
126
|
className={
|