@daeryun/dr_components 1.0.14 → 1.0.16

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.
@@ -1,55 +1,17 @@
1
1
  import React from 'react';
2
2
  import { htmlUrlDecode } from '../../../../lib';
3
- const H2Contents = ({ h2Template, index, faqCount }) => {
3
+ const H2Contents = ({ h2Template, index }) => {
4
4
  const { active_faq } = h2Template;
5
- console.log('h2 active_faq :', active_faq);
6
- console.log('h2 faqCount :', faqCount);
7
- const getItemScope = () => {
8
- if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
9
- return true;
10
- }
11
- return undefined;
12
- };
13
- const getItemProp = (category) => {
14
- if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
15
- switch (category) {
16
- case 'mainEntity':
17
- return 'mainEntity';
18
- case 'acceptedAnswer':
19
- return 'acceptedAnswer';
20
- case 'name':
21
- return 'name';
22
- case 'text':
23
- return 'text';
24
- default:
25
- undefined;
26
- }
27
- }
28
- return undefined;
29
- };
30
- const getItemType = (category) => {
31
- if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
32
- switch (category) {
33
- case 'question':
34
- return 'https://schema.org/Question';
35
- case 'answer':
36
- return 'https://schema.org/Answer';
37
- default:
38
- undefined;
39
- }
40
- }
41
- return undefined;
42
- };
43
- return (<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
44
- <h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={getItemProp('name')}>
5
+ return (<div itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'mainEntity'} itemType={active_faq ? '' : 'https://schema.org/Question'}>
6
+ <h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={active_faq ? '' : 'name'}>
45
7
  {index + 1}. {h2Template.tag_title}
46
8
  </h2>
47
9
  <div className={'px-[10px] sm:px-[18px]'}>
48
10
  {/*h2 설명글*/}
49
- <div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={getItemScope()} itemProp={getItemProp('acceptedAnswer')} itemType={getItemType('answer')}>
50
- {h2Template.is_editor ? (<div itemProp={getItemProp('text')} id={'ck-content'} dangerouslySetInnerHTML={{
11
+ <div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'acceptedAnswer'} itemType={active_faq ? '' : 'https://schema.org/Answer'}>
12
+ {h2Template.is_editor ? (<div itemProp={active_faq ? '' : 'text'} id={'ck-content'} dangerouslySetInnerHTML={{
51
13
  __html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
52
- }}/>) : (<div itemProp={getItemProp('text')}>{h2Template.description}</div>)}
14
+ }}/>) : (<div itemProp={active_faq ? '' : 'text'}>{h2Template.description}</div>)}
53
15
  </div>
54
16
  </div>
55
17
  </div>);
@@ -1,73 +1,21 @@
1
1
  import React from 'react';
2
2
  import { ISeoTemplateTypes } from '../SuccessNewType';
3
3
  import { htmlUrlDecode } from '../../../../lib';
4
-
5
- type ItemPropTypes = 'mainEntity' | 'acceptedAnswer' | 'name' | 'text';
6
- type ItemTypes = 'question' | 'answer';
7
-
8
- const H2Contents = ({
9
- h2Template,
10
- index,
11
- faqCount
12
- }: {
13
- h2Template: ISeoTemplateTypes;
14
- index: number;
15
- faqCount?: number;
16
- }) => {
4
+ const H2Contents = ({ h2Template, index }: { h2Template: ISeoTemplateTypes; index: number }) => {
17
5
  const { active_faq } = h2Template;
18
- console.log('h2 active_faq :', active_faq);
19
- console.log('h2 faqCount :', faqCount);
20
-
21
- const getItemScope = (): boolean | undefined => {
22
- if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
23
- return true;
24
- }
25
-
26
- return undefined;
27
- };
28
-
29
- const getItemProp = (category: ItemPropTypes): string | undefined => {
30
- if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
31
- switch (category) {
32
- case 'mainEntity':
33
- return 'mainEntity';
34
- case 'acceptedAnswer':
35
- return 'acceptedAnswer';
36
- case 'name':
37
- return 'name';
38
- case 'text':
39
- return 'text';
40
- default:
41
- undefined;
42
- }
43
- }
44
-
45
- return undefined;
46
- };
47
-
48
- const getItemType = (category: ItemTypes): string | undefined => {
49
- if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
50
- switch (category) {
51
- case 'question':
52
- return 'https://schema.org/Question';
53
- case 'answer':
54
- return 'https://schema.org/Answer';
55
- default:
56
- undefined;
57
- }
58
- }
59
-
60
- return undefined;
61
- };
62
6
 
63
7
  return (
64
- <div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
8
+ <div
9
+ itemScope={active_faq ? undefined : true}
10
+ itemProp={active_faq ? '' : 'mainEntity'}
11
+ itemType={active_faq ? '' : 'https://schema.org/Question'}
12
+ >
65
13
  <h2
66
14
  className={
67
15
  'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'
68
16
  }
69
17
  id={h2Template.idx.toString()}
70
- itemProp={getItemProp('name')}
18
+ itemProp={active_faq ? '' : 'name'}
71
19
  >
72
20
  {index + 1}. {h2Template.tag_title}
73
21
  </h2>
@@ -77,20 +25,20 @@ const H2Contents = ({
77
25
  className={
78
26
  'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'
79
27
  }
80
- itemScope={getItemScope()}
81
- itemProp={getItemProp('acceptedAnswer')}
82
- itemType={getItemType('answer')}
28
+ itemScope={active_faq ? undefined : true}
29
+ itemProp={active_faq ? '' : 'acceptedAnswer'}
30
+ itemType={active_faq ? '' : 'https://schema.org/Answer'}
83
31
  >
84
32
  {h2Template.is_editor ? (
85
33
  <div
86
- itemProp={getItemProp('text')}
34
+ itemProp={active_faq ? '' : 'text'}
87
35
  id={'ck-content'}
88
36
  dangerouslySetInnerHTML={{
89
37
  __html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
90
38
  }}
91
39
  />
92
40
  ) : (
93
- <div itemProp={getItemProp('text')}>{h2Template.description}</div>
41
+ <div itemProp={active_faq ? '' : 'text'}>{h2Template.description}</div>
94
42
  )}
95
43
  </div>
96
44
  </div>
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ISeoTemplateTypes } from '../SuccessNewType';
3
- declare const H3Contents: ({ h3Template, faqCount }: {
3
+ declare const H3Contents: ({ h3Template }: {
4
4
  h3Template: ISeoTemplateTypes;
5
- faqCount?: number;
6
5
  }) => React.JSX.Element;
7
6
  export default H3Contents;
@@ -2,57 +2,19 @@ import React from 'react';
2
2
  import Image from 'next/image';
3
3
  import { htmlUrlDecode } from '../../../../lib';
4
4
  import FieldIcon from '../../../../asset/images/success_new/field_icon.webp';
5
- const H3Contents = ({ h3Template, faqCount }) => {
5
+ const H3Contents = ({ h3Template }) => {
6
6
  const { active_faq } = h3Template;
7
- console.log('h3 active_faq :', active_faq);
8
- console.log('h3 faqCount :', faqCount);
9
- const getItemScope = () => {
10
- if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
11
- return true;
12
- }
13
- return undefined;
14
- };
15
- const getItemProp = (category) => {
16
- if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
17
- switch (category) {
18
- case 'mainEntity':
19
- return 'mainEntity';
20
- case 'acceptedAnswer':
21
- return 'acceptedAnswer';
22
- case 'name':
23
- return 'name';
24
- case 'text':
25
- return 'text';
26
- default:
27
- undefined;
28
- }
29
- }
30
- return undefined;
31
- };
32
- const getItemType = (category) => {
33
- if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
34
- switch (category) {
35
- case 'question':
36
- return 'https://schema.org/Question';
37
- case 'answer':
38
- return 'https://schema.org/Answer';
39
- default:
40
- undefined;
41
- }
42
- }
43
- return undefined;
44
- };
45
7
  return (<>
46
- <div className={'px-[10px] sm:px-[18px]'} key={'h3영역' + h3Template.idx} itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
8
+ <div className={'px-[10px] sm:px-[18px]'} key={'h3영역' + h3Template.idx} itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'mainEntity'} itemType={active_faq ? '' : 'https://schema.org/Question'}>
47
9
  {/*h3*/}
48
- <h3 className={'mb-[16px] flex items-center break-keep text-[18px] font-bold tracking-[-0.96px] text-[#285FA7] sm:mb-[18px] sm:text-[22px] lg:mb-[22.5px] lg:text-[24px]'} id={h3Template.idx.toString()} itemProp={getItemProp('name')}>
10
+ <h3 className={'mb-[16px] flex items-center break-keep text-[18px] font-bold tracking-[-0.96px] text-[#285FA7] sm:mb-[18px] sm:text-[22px] lg:mb-[22.5px] lg:text-[24px]'} id={h3Template.idx.toString()} itemProp={active_faq ? '' : 'name'}>
49
11
  {/*모든 seo 체크로 변경*/}
50
12
  <Image src={FieldIcon} alt={'h3 img'} width={27} height={26} className={'mr-[8px] h-auto max-sm:w-[22px]'}/>
51
13
  {h3Template.tag_title}
52
14
  </h3>
53
15
  {/*h3 설명글*/}
54
- <div itemScope={getItemScope()} itemProp={getItemProp('acceptedAnswer')} itemType={getItemType('answer')}>
55
- <div className={'mb-[44px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:text-[17.25px] lg:mb-[78px]'} itemProp={getItemProp('text')} id={'ck-content'} dangerouslySetInnerHTML={{
16
+ <div itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'acceptedAnswer'} itemType={active_faq ? '' : 'https://schema.org/Answer'}>
17
+ <div className={'mb-[44px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:text-[17.25px] lg:mb-[78px]'} itemProp={active_faq ? '' : 'text'} id={'ck-content'} dangerouslySetInnerHTML={{
56
18
  __html: htmlUrlDecode(h3Template.description.replace('../../UploadFile', '/SE2/upload'))
57
19
  }}></div>
58
20
  </div>
@@ -3,65 +3,17 @@ import Image from 'next/image';
3
3
  import { ISeoTemplateTypes } from '../SuccessNewType';
4
4
  import { htmlUrlDecode } from '../../../../lib';
5
5
  import FieldIcon from '../../../../asset/images/success_new/field_icon.webp';
6
-
7
- type ItemPropTypes = 'mainEntity' | 'acceptedAnswer' | 'name' | 'text';
8
- type ItemTypes = 'question' | 'answer';
9
-
10
- const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; faqCount?: number }) => {
6
+ const H3Contents = ({ h3Template }: { h3Template: ISeoTemplateTypes }) => {
11
7
  const { active_faq } = h3Template;
12
- console.log('h3 active_faq :', active_faq);
13
- console.log('h3 faqCount :', faqCount);
14
-
15
- const getItemScope = (): boolean | undefined => {
16
- if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
17
- return true;
18
- }
19
-
20
- return undefined;
21
- };
22
-
23
- const getItemProp = (category: ItemPropTypes): string | undefined => {
24
- if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
25
- switch (category) {
26
- case 'mainEntity':
27
- return 'mainEntity';
28
- case 'acceptedAnswer':
29
- return 'acceptedAnswer';
30
- case 'name':
31
- return 'name';
32
- case 'text':
33
- return 'text';
34
- default:
35
- undefined;
36
- }
37
- }
38
-
39
- return undefined;
40
- };
41
-
42
- const getItemType = (category: ItemTypes): string | undefined => {
43
- if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
44
- switch (category) {
45
- case 'question':
46
- return 'https://schema.org/Question';
47
- case 'answer':
48
- return 'https://schema.org/Answer';
49
- default:
50
- undefined;
51
- }
52
- }
53
-
54
- return undefined;
55
- };
56
8
 
57
9
  return (
58
10
  <>
59
11
  <div
60
12
  className={'px-[10px] sm:px-[18px]'}
61
13
  key={'h3영역' + h3Template.idx}
62
- itemScope={getItemScope()}
63
- itemProp={getItemProp('mainEntity')}
64
- itemType={getItemType('question')}
14
+ itemScope={active_faq ? undefined : true}
15
+ itemProp={active_faq ? '' : 'mainEntity'}
16
+ itemType={active_faq ? '' : 'https://schema.org/Question'}
65
17
  >
66
18
  {/*h3*/}
67
19
  <h3
@@ -69,7 +21,7 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
69
21
  'mb-[16px] flex items-center break-keep text-[18px] font-bold tracking-[-0.96px] text-[#285FA7] sm:mb-[18px] sm:text-[22px] lg:mb-[22.5px] lg:text-[24px]'
70
22
  }
71
23
  id={h3Template.idx.toString()}
72
- itemProp={getItemProp('name')}
24
+ itemProp={active_faq ? '' : 'name'}
73
25
  >
74
26
  {/*모든 seo 체크로 변경*/}
75
27
  <Image
@@ -83,15 +35,15 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
83
35
  </h3>
84
36
  {/*h3 설명글*/}
85
37
  <div
86
- itemScope={getItemScope()}
87
- itemProp={getItemProp('acceptedAnswer')}
88
- itemType={getItemType('answer')}
38
+ itemScope={active_faq ? undefined : true}
39
+ itemProp={active_faq ? '' : 'acceptedAnswer'}
40
+ itemType={active_faq ? '' : 'https://schema.org/Answer'}
89
41
  >
90
42
  <div
91
43
  className={
92
44
  'mb-[44px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:text-[17.25px] lg:mb-[78px]'
93
45
  }
94
- itemProp={getItemProp('text')}
46
+ itemProp={active_faq ? '' : 'text'}
95
47
  id={'ck-content'}
96
48
  dangerouslySetInnerHTML={{
97
49
  __html: htmlUrlDecode(h3Template.description.replace('../../UploadFile', '/SE2/upload'))
@@ -19,36 +19,53 @@ const LawInfoContentList = ({ contentsList, template, className }) => {
19
19
  </div>
20
20
  <ul className={'grid grid-cols-3 gap-[20px] ' + 'max-lg:grid-cols-2 ' + 'max-sm:grid-cols-1 max-sm:gap-3'}>
21
21
  {contentsList &&
22
- contentsList.map((content, index) => (<li key={'contents ' + content.type_idx} className={'z-10'}>
23
- <Link target={content.center_code === template[0].center_code ? '' : '_blank'} href={content.center_code === template[0].center_code
24
- ? `/lawInfo_new/${content.type_idx}`
25
- : `${content.domain}lawInfo_new/${content.type_idx}`} onMouseEnter={() => setHoverNum(index)} className={'z-10 flex h-full w-full items-start justify-between gap-[10px] bg-[#192555] p-4 transition-all ' +
26
- `${index === hoverNum ? ' ' : 'bg-opacity-0 '} ` +
27
- //1024px
28
- 'max-lg:gap-[8px] ' +
29
- //768px
30
- 'max-md:p-3 ' +
31
- //400px
32
- 'max-2xs:gap-2'} style={{
33
- border: '1px solid',
34
- borderColor: index === hoverNum ? 'transparent' : '#D3D3D3'
35
- }}>
36
- <p className={'line-clamp-2 pt-[2px] text-[20px] font-[600] leading-[135%] tracking-[-4%] transition-colors ' +
37
- `${index === hoverNum ? 'text-white ' : 'text-[#192555] '}` +
38
- //1400px
39
- 'max-xxl:text-[18px] ' +
40
- //768px
41
- 'max-md:text-[16px] ' +
42
- //480px
43
- 'max-xs:pt-[1px] max-xs:leading-[25px]'}>
44
- {content.tag_title}
45
- </p>
46
- <IconArrow className={'mx-[6px] mt-2 h-auto w-[10px] shrink-0 ' +
47
- `${index === hoverNum ? 'fill-white ' : 'fill-[#192555] '}` +
48
- //1400px
49
- 'max-xxl:mt-[4px] max-xxl:w-2 '}/>
50
- </Link>
51
- </li>))}
22
+ contentsList.map((content, index) => {
23
+ var _a;
24
+ const SERVICE_DOMAIN = (_a = process.env.NEXT_PUBLIC_SERVICE_DOMAIN) !== null && _a !== void 0 ? _a : '';
25
+ const isConsultGroup = String(SERVICE_DOMAIN).includes('consulting');
26
+ const href = isConsultGroup
27
+ ? content.center_code === 'CT0023' //상담 그룹의 경우 다른 그룹의 업무분야를 불러오기때문에 조건문 다르게 처리 필요
28
+ ? `/lawInfo_new/${content.type_idx}`
29
+ : `${content.domain}lawInfo_new/${content.type_idx}`
30
+ : content.center_code === template[0].center_code
31
+ ? `/lawInfo_new/${content.type_idx}`
32
+ : `${content.domain}lawInfo_new/${content.type_idx}`;
33
+ const target = isConsultGroup
34
+ ? content.center_code === 'CT0023' //상담 그룹의 경우 다른 그룹의 업무분야를 불러오기때문에 조건문 다르게 처리 필요
35
+ ? ''
36
+ : '_blank'
37
+ : content.center_code === template[0].center_code
38
+ ? ''
39
+ : '_blank';
40
+ return (<li key={'contents ' + content.type_idx} className={'z-10'}>
41
+ <Link target={target} href={href} onMouseEnter={() => setHoverNum(index)} className={'z-10 flex h-full w-full items-start justify-between gap-[10px] bg-[#192555] p-4 transition-all ' +
42
+ `${index === hoverNum ? ' ' : 'bg-opacity-0 '} ` +
43
+ //1024px
44
+ 'max-lg:gap-[8px] ' +
45
+ //768px
46
+ 'max-md:p-3 ' +
47
+ //400px
48
+ 'max-2xs:gap-2'} style={{
49
+ border: '1px solid',
50
+ borderColor: index === hoverNum ? 'transparent' : '#D3D3D3'
51
+ }}>
52
+ <p className={'line-clamp-2 pt-[2px] text-[20px] font-[600] leading-[135%] tracking-[-4%] transition-colors ' +
53
+ `${index === hoverNum ? 'text-white ' : 'text-[#192555] '}` +
54
+ //1400px
55
+ 'max-xxl:text-[18px] ' +
56
+ //768px
57
+ 'max-md:text-[16px] ' +
58
+ //480px
59
+ 'max-xs:pt-[1px] max-xs:leading-[25px]'}>
60
+ {content.tag_title}
61
+ </p>
62
+ <IconArrow className={'mx-[6px] mt-2 h-auto w-[10px] shrink-0 ' +
63
+ `${index === hoverNum ? 'fill-white ' : 'fill-[#192555] '}` +
64
+ //1400px
65
+ 'max-xxl:mt-[4px] max-xxl:w-2 '}/>
66
+ </Link>
67
+ </li>);
68
+ })}
52
69
  </ul>
53
70
  </section>);
54
71
  };
@@ -48,56 +48,73 @@ const LawInfoContentList = ({
48
48
  </div>
49
49
  <ul className={'grid grid-cols-3 gap-[20px] ' + 'max-lg:grid-cols-2 ' + 'max-sm:grid-cols-1 max-sm:gap-3'}>
50
50
  {contentsList &&
51
- contentsList.map((content, index) => (
52
- <li key={'contents ' + content.type_idx} className={'z-10'}>
53
- <Link
54
- target={content.center_code === template[0].center_code ? '' : '_blank'}
55
- href={
56
- content.center_code === template[0].center_code
57
- ? `/lawInfo_new/${content.type_idx}`
58
- : `${content.domain}lawInfo_new/${content.type_idx}`
59
- }
60
- onMouseEnter={() => setHoverNum(index)}
61
- className={
62
- 'z-10 flex h-full w-full items-start justify-between gap-[10px] bg-[#192555] p-4 transition-all ' +
63
- `${index === hoverNum ? ' ' : 'bg-opacity-0 '} ` +
64
- //1024px
65
- 'max-lg:gap-[8px] ' +
66
- //768px
67
- 'max-md:p-3 ' +
68
- //400px
69
- 'max-2xs:gap-2'
70
- }
71
- style={{
72
- border: '1px solid',
73
- borderColor: index === hoverNum ? 'transparent' : '#D3D3D3'
74
- }}
75
- >
76
- <p
51
+ contentsList.map((content, index) => {
52
+ const SERVICE_DOMAIN = process.env.NEXT_PUBLIC_SERVICE_DOMAIN ?? '';
53
+ const isConsultGroup = String(SERVICE_DOMAIN).includes('consulting');
54
+
55
+ const href = isConsultGroup
56
+ ? content.center_code === 'CT0023' //상담 그룹의 경우 다른 그룹의 업무분야를 불러오기때문에 조건문 다르게 처리 필요
57
+ ? `/lawInfo_new/${content.type_idx}`
58
+ : `${content.domain}lawInfo_new/${content.type_idx}`
59
+ : content.center_code === template[0].center_code
60
+ ? `/lawInfo_new/${content.type_idx}`
61
+ : `${content.domain}lawInfo_new/${content.type_idx}`;
62
+
63
+ const target = isConsultGroup
64
+ ? content.center_code === 'CT0023' //상담 그룹의 경우 다른 그룹의 업무분야를 불러오기때문에 조건문 다르게 처리 필요
65
+ ? ''
66
+ : '_blank'
67
+ : content.center_code === template[0].center_code
68
+ ? ''
69
+ : '_blank';
70
+
71
+ return (
72
+ <li key={'contents ' + content.type_idx} className={'z-10'}>
73
+ <Link
74
+ target={target}
75
+ href={href}
76
+ onMouseEnter={() => setHoverNum(index)}
77
77
  className={
78
- 'line-clamp-2 pt-[2px] text-[20px] font-[600] leading-[135%] tracking-[-4%] transition-colors ' +
79
- `${index === hoverNum ? 'text-white ' : 'text-[#192555] '}` +
80
- //1400px
81
- 'max-xxl:text-[18px] ' +
78
+ 'z-10 flex h-full w-full items-start justify-between gap-[10px] bg-[#192555] p-4 transition-all ' +
79
+ `${index === hoverNum ? ' ' : 'bg-opacity-0 '} ` +
80
+ //1024px
81
+ 'max-lg:gap-[8px] ' +
82
82
  //768px
83
- 'max-md:text-[16px] ' +
84
- //480px
85
- 'max-xs:pt-[1px] max-xs:leading-[25px]'
83
+ 'max-md:p-3 ' +
84
+ //400px
85
+ 'max-2xs:gap-2'
86
86
  }
87
+ style={{
88
+ border: '1px solid',
89
+ borderColor: index === hoverNum ? 'transparent' : '#D3D3D3'
90
+ }}
87
91
  >
88
- {content.tag_title}
89
- </p>
90
- <IconArrow
91
- className={
92
- 'mx-[6px] mt-2 h-auto w-[10px] shrink-0 ' +
93
- `${index === hoverNum ? 'fill-white ' : 'fill-[#192555] '}` +
94
- //1400px
95
- 'max-xxl:mt-[4px] max-xxl:w-2 '
96
- }
97
- />
98
- </Link>
99
- </li>
100
- ))}
92
+ <p
93
+ className={
94
+ 'line-clamp-2 pt-[2px] text-[20px] font-[600] leading-[135%] tracking-[-4%] transition-colors ' +
95
+ `${index === hoverNum ? 'text-white ' : 'text-[#192555] '}` +
96
+ //1400px
97
+ 'max-xxl:text-[18px] ' +
98
+ //768px
99
+ 'max-md:text-[16px] ' +
100
+ //480px
101
+ 'max-xs:pt-[1px] max-xs:leading-[25px]'
102
+ }
103
+ >
104
+ {content.tag_title}
105
+ </p>
106
+ <IconArrow
107
+ className={
108
+ 'mx-[6px] mt-2 h-auto w-[10px] shrink-0 ' +
109
+ `${index === hoverNum ? 'fill-white ' : 'fill-[#192555] '}` +
110
+ //1400px
111
+ 'max-xxl:mt-[4px] max-xxl:w-2 '
112
+ }
113
+ />
114
+ </Link>
115
+ </li>
116
+ );
117
+ })}
101
118
  </ul>
102
119
  </section>
103
120
  );