@daeryun/dr_components 0.5.29 → 0.5.32

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.
@@ -10,11 +10,13 @@ import { searchColorLawyerText } from '../../../common/integrate';
10
10
  const BasicInfo = ({
11
11
  lawyerInfo,
12
12
  codeList,
13
+ centerCode,
13
14
  integrateSearch
14
15
  }: {
15
16
  lawyerInfo: ILawyer;
16
17
  codeList: any[];
17
18
  integrateSearch: string;
19
+ centerCode: string;
18
20
  }) => {
19
21
  const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
20
22
  const lawyerImagePath: string = imagePath + '/upload/lawyer';
@@ -46,14 +48,16 @@ const BasicInfo = ({
46
48
  }, []);
47
49
 
48
50
  useEffect(() => {
49
- if (lawyerInfo.l_ability) {
50
- const flag1: boolean = lawyerInfo.l_ability.length > 30;
51
- const flag2: boolean =
52
- lawyerInfo.l_ability?.split('\n').length > 1 && lawyerInfo.l_ability?.split('\n')[0].length > 14;
51
+ const data =
52
+ lawyerInfo.l_sort_center?.includes(centerCode) && lawyerInfo.careers_summary
53
+ ? lawyerInfo.careers_summary
54
+ : lawyerInfo.l_ability;
55
+ if (data) {
56
+ const flag1: boolean = data.length > 30;
57
+ const flag2: boolean = data?.split('\n').length > 1 && data?.split('\n')[0].length > 14;
53
58
  setCssFlag(flag1 || flag2);
54
59
  }
55
60
  }, [lawyerInfo]);
56
-
57
61
  return (
58
62
  <div className={'relative w-full pb-[120px] max-md:pb-0'}>
59
63
  {/*#F8F8F8 배경 768px부터 hidden*/}
@@ -124,7 +128,7 @@ const BasicInfo = ({
124
128
  }
125
129
  >
126
130
  &nbsp;
127
- {lawyerInfo.l_position}
131
+ {searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
128
132
  </span>
129
133
  ) : (
130
134
  <></>
@@ -162,7 +166,12 @@ const BasicInfo = ({
162
166
  'relative w-full font-[500]'
163
167
  }
164
168
  >
165
- {searchColorLawyerText(lawyerInfo.l_ability, integrateSearch)}
169
+ {searchColorLawyerText(
170
+ lawyerInfo.l_sort_center?.includes(centerCode) && lawyerInfo.careers_summary
171
+ ? lawyerInfo.careers_summary
172
+ : lawyerInfo.l_ability,
173
+ integrateSearch
174
+ )}
166
175
 
167
176
  <span
168
177
  className={
@@ -215,7 +224,7 @@ const BasicInfo = ({
215
224
  {lawyerInfo.l_position ? (
216
225
  <span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
217
226
  &nbsp;
218
- {lawyerInfo.l_position}
227
+ {searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
219
228
  </span>
220
229
  ) : (
221
230
  <></>
@@ -234,7 +243,14 @@ const BasicInfo = ({
234
243
  integrateSearch
235
244
  )}
236
245
  </p>
237
- <p className={'font-[500] max-2sm:whitespace-pre-wrap'}>{lawyerInfo.l_ability}</p>
246
+ <p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
247
+ {searchColorLawyerText(
248
+ lawyerInfo.l_sort_center?.includes(centerCode) && lawyerInfo.careers_summary
249
+ ? lawyerInfo.careers_summary
250
+ : lawyerInfo.l_ability,
251
+ integrateSearch
252
+ )}
253
+ </p>
238
254
  <p className={'flex items-center gap-2'}>
239
255
  {lawyerInfo.l_tel && (
240
256
  <Link
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
  import React, { useState, Suspense } from 'react';
3
- // import { useTranslation } from 'next-i18next';
4
3
  import IntroWrapper from '../../_component/_layout/IntroWrapper';
5
4
  import SubMenuButton from '../../_component/_button/SubMenuButton';
6
5
  import HeaderLayout from '../../_component/_layout/HeaderLayout';
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
 
3
3
  import React, { useEffect, useState, Suspense } from 'react';
4
- // import { useTranslation } from 'next-i18next';
5
4
  import IntroWrapper from '../../_component/_layout/IntroWrapper';
6
5
  import CaseLayout from '../../_component/_layout/CaseLayout';
7
6
  import SubMenuButton from '../../_component/_button/SubMenuButton';
@@ -1,15 +1,13 @@
1
1
  import Image from 'next/image';
2
2
  import CategoryMenu from '../_breadCrumble/CategoryMenu';
3
- // import { useTranslation } from 'next-i18next';
4
3
  import CaseWrapper from './CaseWrapper';
5
4
  import Wrapper from '../../../../Layout/Wrapper';
6
5
  const IntroWrapper = ({ backgroundImage, backgroundTbImage, backgroundMoImage, outerClassName, title, subTitle }) => {
7
- // const { t } = useTranslation('common');
8
6
  return (<div className={'absolute w-screen min-w-[360px] ' + outerClassName}>
9
7
  {backgroundImage ? (<>
10
8
  <Image unoptimized src={backgroundImage} alt="background" fill className="hidden object-cover lg:block"/>
11
- <Image unoptimized src={backgroundTbImage} alt="background" fill className="sm-top:block hidden object-cover lg:hidden"/>
12
- <Image unoptimized src={backgroundMoImage} alt="background" fill className="max-sm-top:block hidden object-cover"/>
9
+ <Image unoptimized src={backgroundTbImage} alt="background" fill className="hidden object-cover sm-top:block lg:hidden"/>
10
+ <Image unoptimized src={backgroundMoImage} alt="background" fill className="hidden object-cover max-sm-top:block"/>
13
11
  </>) : (<></>)}
14
12
 
15
13
  <Wrapper>
@@ -1,7 +1,5 @@
1
1
  import Image, { StaticImageData } from 'next/image';
2
-
3
2
  import CategoryMenu from '../_breadCrumble/CategoryMenu';
4
- // import { useTranslation } from 'next-i18next';
5
3
  import CaseWrapper from './CaseWrapper';
6
4
  import Wrapper from '../../../../Layout/Wrapper';
7
5
 
@@ -20,7 +18,6 @@ const IntroWrapper = ({
20
18
  title?: string;
21
19
  subTitle?: string;
22
20
  }) => {
23
- // const { t } = useTranslation('common');
24
21
  return (
25
22
  <div className={'absolute w-screen min-w-[360px] ' + outerClassName}>
26
23
  {backgroundImage ? (
@@ -37,14 +34,14 @@ const IntroWrapper = ({
37
34
  src={backgroundTbImage}
38
35
  alt="background"
39
36
  fill
40
- className="sm-top:block hidden object-cover lg:hidden"
37
+ className="hidden object-cover sm-top:block lg:hidden"
41
38
  />
42
39
  <Image
43
40
  unoptimized
44
41
  src={backgroundMoImage}
45
42
  alt="background"
46
43
  fill
47
- className="max-sm-top:block hidden object-cover"
44
+ className="hidden object-cover max-sm-top:block"
48
45
  />
49
46
  </>
50
47
  ) : (