@daeryun/dr_components 0.6.86 → 0.6.87
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/Footer/Footer.stories.jsx +5 -3
- package/dist/components/Footer/Footer.stories.tsx +5 -3
- package/dist/components/Footer/IFooterTypes.d.ts +17 -15
- package/dist/components/Footer/IFooterTypes.js +317 -1
- package/dist/components/Footer/IFooterTypes.ts +334 -15
- package/dist/components/Footer/_backup/index.d.ts +5 -0
- package/dist/components/Footer/_backup/index.jsx +423 -0
- package/dist/components/Footer/_backup/index.tsx +747 -0
- package/dist/components/Footer/index.d.ts +1 -1
- package/dist/components/Footer/index.jsx +44 -88
- package/dist/components/Footer/index.tsx +107 -166
- package/dist/styles/globals.css +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -4,11 +4,11 @@ import Image from 'next/image';
|
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import * as gtag from '../../lib/gtag';
|
|
6
6
|
import Link from 'next/link';
|
|
7
|
-
import {
|
|
7
|
+
import { insert, savePowerLinkConversion } from '../../lib';
|
|
8
8
|
import Wrapper from '../Layout/Wrapper';
|
|
9
9
|
import TopBtn from './TopBtn';
|
|
10
|
-
import { usePathname
|
|
11
|
-
import {
|
|
10
|
+
import { usePathname } from 'next/navigation';
|
|
11
|
+
import { ICenterLinkTypes, INewFooterTypes } from './IFooterTypes';
|
|
12
12
|
import sns01 from '../../asset/images/footer/sns_01.webp';
|
|
13
13
|
import sns02 from '../../asset/images/footer/sns_02.webp';
|
|
14
14
|
import sns03 from '../../asset/images/footer/sns_03.webp';
|
|
@@ -19,12 +19,9 @@ import MedicalBrochureBtn from '../BrochureBtn/MedicalBrochureBtn';
|
|
|
19
19
|
import { useActionGetTermList } from './_actions/action';
|
|
20
20
|
import { ITermType } from '../page/Login/_types/termType';
|
|
21
21
|
|
|
22
|
-
interface GroupsProps {
|
|
23
|
-
list: IGroupsData[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
22
|
const NewFooter = ({
|
|
27
23
|
groupsData,
|
|
24
|
+
center_code,
|
|
28
25
|
tel,
|
|
29
26
|
logo,
|
|
30
27
|
aceUrl,
|
|
@@ -33,13 +30,10 @@ const NewFooter = ({
|
|
|
33
30
|
isMedical,
|
|
34
31
|
brochureType
|
|
35
32
|
}: INewFooterTypes) => {
|
|
36
|
-
const router = useRouter();
|
|
37
33
|
const pathname = usePathname();
|
|
38
34
|
const mobile = require('is-mobile');
|
|
39
|
-
const snsClass =
|
|
40
|
-
'w-[44px] h-auto mr-[5px] max-md:w-[40px] max-md:m-0 max-xs:w-[45px] max-xs:mr-[17px] max-2xs:w-[40px] max-3xs:w-[35px]';
|
|
41
|
-
const [isGroups, setIsGroups] = useState<GroupsProps[]>([]);
|
|
42
35
|
|
|
36
|
+
const [centerLink, setCenterLink] = useState<ICenterLinkTypes[]>([]);
|
|
43
37
|
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
44
38
|
const [isOpen, setIsOpen] = useState(false);
|
|
45
39
|
const wrapperRef = useRef(null);
|
|
@@ -48,7 +42,7 @@ const NewFooter = ({
|
|
|
48
42
|
|
|
49
43
|
const fetchData = async () => {
|
|
50
44
|
try {
|
|
51
|
-
const req = await fetch(
|
|
45
|
+
const req = await fetch(`/api/center/list?type=new_footer¢er_code=${center_code}`);
|
|
52
46
|
return await req.json();
|
|
53
47
|
} catch (error) {
|
|
54
48
|
console.error(`fetch groupsData error : ${error} `);
|
|
@@ -59,8 +53,8 @@ const NewFooter = ({
|
|
|
59
53
|
const fetchGroupsData = async () => {
|
|
60
54
|
if (pathname !== '/') {
|
|
61
55
|
try {
|
|
62
|
-
const data:
|
|
63
|
-
|
|
56
|
+
const data: ICenterLinkTypes[] = await fetchData();
|
|
57
|
+
setCenterLink(data);
|
|
64
58
|
} catch (error) {
|
|
65
59
|
console.error(`fetch groupsData useEffect error: ${error}`);
|
|
66
60
|
}
|
|
@@ -230,11 +224,11 @@ const NewFooter = ({
|
|
|
230
224
|
<FooterSelectBox
|
|
231
225
|
wrapperRef={wrapperRef}
|
|
232
226
|
groupsData={groupsData}
|
|
233
|
-
isGroups={isGroups}
|
|
234
227
|
routeLocation={routeLocation}
|
|
235
228
|
setIsOpen={setIsOpen}
|
|
236
229
|
isOpen={isOpen}
|
|
237
230
|
isBrochureBtn={isBrochureBtn}
|
|
231
|
+
centerLink={centerLink}
|
|
238
232
|
/>
|
|
239
233
|
<BrochureBtn
|
|
240
234
|
width={'280px'}
|
|
@@ -260,11 +254,11 @@ const NewFooter = ({
|
|
|
260
254
|
<FooterSelectBox
|
|
261
255
|
wrapperRef={wrapperRef}
|
|
262
256
|
groupsData={groupsData}
|
|
263
|
-
isGroups={isGroups}
|
|
264
257
|
routeLocation={routeLocation}
|
|
265
258
|
setIsOpen={setIsOpen}
|
|
266
259
|
isOpen={isOpen}
|
|
267
260
|
isBrochureBtn={isBrochureBtn}
|
|
261
|
+
centerLink={centerLink}
|
|
268
262
|
/>
|
|
269
263
|
<MedicalBrochureBtn
|
|
270
264
|
width={'280px'}
|
|
@@ -283,8 +277,8 @@ const NewFooter = ({
|
|
|
283
277
|
<FooterSelectBox
|
|
284
278
|
wrapperRef={wrapperRef}
|
|
285
279
|
groupsData={groupsData}
|
|
286
|
-
isGroups={isGroups}
|
|
287
280
|
routeLocation={routeLocation}
|
|
281
|
+
centerLink={centerLink}
|
|
288
282
|
setIsOpen={setIsOpen}
|
|
289
283
|
isOpen={isOpen}
|
|
290
284
|
isBrochureBtn={isBrochureBtn}
|
|
@@ -374,7 +368,15 @@ const NewFooter = ({
|
|
|
374
368
|
target="_blank"
|
|
375
369
|
rel="noopener noreferrer nofollow"
|
|
376
370
|
>
|
|
377
|
-
<Image
|
|
371
|
+
<Image
|
|
372
|
+
src={sns01}
|
|
373
|
+
alt="나의 사건 검색"
|
|
374
|
+
width={66}
|
|
375
|
+
height={66}
|
|
376
|
+
className={
|
|
377
|
+
'mr-[5px] h-auto w-[44px] max-md:m-0 max-md:w-[40px] max-xs:mr-[17px] max-xs:w-[45px] max-2xs:w-[40px] max-3xs:w-[35px]'
|
|
378
|
+
}
|
|
379
|
+
/>
|
|
378
380
|
</Link>
|
|
379
381
|
|
|
380
382
|
<Link
|
|
@@ -387,7 +389,9 @@ const NewFooter = ({
|
|
|
387
389
|
alt="법무법인(유한) 대륜 공식블로그"
|
|
388
390
|
width={37}
|
|
389
391
|
height={31}
|
|
390
|
-
className={
|
|
392
|
+
className={
|
|
393
|
+
'mr-[5px] h-auto w-[44px] max-md:m-0 max-md:w-[40px] max-xs:mr-[17px] max-xs:w-[45px] max-2xs:w-[40px] max-3xs:w-[35px]'
|
|
394
|
+
}
|
|
391
395
|
/>
|
|
392
396
|
</Link>
|
|
393
397
|
|
|
@@ -402,7 +406,9 @@ const NewFooter = ({
|
|
|
402
406
|
alt="법무법인(유한) 대륜 카카오톡채널"
|
|
403
407
|
width={66}
|
|
404
408
|
height={66}
|
|
405
|
-
className={
|
|
409
|
+
className={
|
|
410
|
+
'mr-[5px] h-auto w-[44px] max-md:m-0 max-md:w-[40px] max-xs:mr-[17px] max-xs:w-[45px] max-2xs:w-[40px] max-3xs:w-[35px]'
|
|
411
|
+
}
|
|
406
412
|
/>
|
|
407
413
|
</Link>
|
|
408
414
|
|
|
@@ -417,7 +423,9 @@ const NewFooter = ({
|
|
|
417
423
|
alt="법무법인(유한) 대륜 유투브"
|
|
418
424
|
width={66}
|
|
419
425
|
height={66}
|
|
420
|
-
className={
|
|
426
|
+
className={
|
|
427
|
+
'mr-[5px] h-auto w-[44px] max-md:m-0 max-md:w-[40px] max-xs:mr-[17px] max-xs:w-[45px] max-2xs:w-[40px] max-3xs:w-[35px]'
|
|
428
|
+
}
|
|
421
429
|
/>
|
|
422
430
|
</Link>
|
|
423
431
|
|
|
@@ -432,7 +440,9 @@ const NewFooter = ({
|
|
|
432
440
|
alt="법무법인(유한) 대륜 인스타그램"
|
|
433
441
|
width={66}
|
|
434
442
|
height={66}
|
|
435
|
-
className={
|
|
443
|
+
className={
|
|
444
|
+
'mr-[5px] h-auto w-[44px] max-md:m-0 max-md:w-[40px] max-xs:mr-[17px] max-xs:w-[45px] max-2xs:w-[40px] max-3xs:w-[35px]'
|
|
445
|
+
}
|
|
436
446
|
/>
|
|
437
447
|
</Link>
|
|
438
448
|
{isBrochureBtn && isMedical ? (
|
|
@@ -528,14 +538,14 @@ export const FooterLinkList = () => {
|
|
|
528
538
|
|
|
529
539
|
const FooterSelectBox = (props: {
|
|
530
540
|
isBrochureBtn?: boolean;
|
|
541
|
+
centerLink: ICenterLinkTypes[];
|
|
531
542
|
wrapperRef: any;
|
|
532
543
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
533
544
|
isOpen: boolean;
|
|
534
545
|
routeLocation: boolean;
|
|
535
|
-
groupsData:
|
|
536
|
-
isGroups: GroupsProps[];
|
|
546
|
+
groupsData: ICenterLinkTypes[] | null;
|
|
537
547
|
}) => {
|
|
538
|
-
const { isBrochureBtn, wrapperRef, setIsOpen, isOpen, routeLocation, groupsData
|
|
548
|
+
const { isBrochureBtn, wrapperRef, setIsOpen, isOpen, centerLink, routeLocation, groupsData } = props;
|
|
539
549
|
|
|
540
550
|
return (
|
|
541
551
|
<div className={(isBrochureBtn ? 'max-xs:w-full' : '') + ' xl:ml-auto'}>
|
|
@@ -580,147 +590,78 @@ const FooterSelectBox = (props: {
|
|
|
580
590
|
aria-expanded="true"
|
|
581
591
|
aria-hidden="false"
|
|
582
592
|
>
|
|
583
|
-
{routeLocation
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
?.map((item: any, index: number) => (
|
|
656
|
-
// 메인페이지가 아닌 경로로 유입되었을 때, api 호출하여 받은 데이터. 색인 x
|
|
657
|
-
<React.Fragment key={index}>
|
|
658
|
-
<li
|
|
659
|
-
key={index}
|
|
660
|
-
value={item.code_name}
|
|
661
|
-
className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100"
|
|
662
|
-
>
|
|
663
|
-
<Link
|
|
664
|
-
href={getDomainHandler(item.code, item.code_desc)}
|
|
665
|
-
key={index}
|
|
666
|
-
target="_blank"
|
|
667
|
-
title={item.code_name}
|
|
668
|
-
onClick={() => {
|
|
669
|
-
setIsOpen(!isOpen);
|
|
670
|
-
}}
|
|
671
|
-
>
|
|
672
|
-
{item.code === 'CT0000'
|
|
673
|
-
? item.code_name
|
|
674
|
-
: item.code === 'CT0023' || item.code === 'CT0028'
|
|
675
|
-
? `${item.code_name} 센터`
|
|
676
|
-
: `${item.code_name} 그룹`}
|
|
677
|
-
</Link>
|
|
678
|
-
</li>
|
|
679
|
-
{item.children?.length > 0 &&
|
|
680
|
-
item.children?.map((childGroup: any) => (
|
|
681
|
-
<React.Fragment
|
|
682
|
-
key={childGroup.code + childGroup.code_name + childGroup.etc2}
|
|
683
|
-
>
|
|
684
|
-
<li
|
|
685
|
-
key={childGroup.code}
|
|
686
|
-
value={childGroup.code_name}
|
|
687
|
-
className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
|
|
688
|
-
>
|
|
689
|
-
<Link
|
|
690
|
-
href={childGroup.etc2}
|
|
691
|
-
key={index}
|
|
692
|
-
target="_blank"
|
|
693
|
-
title={childGroup.codename}
|
|
694
|
-
onClick={() => {
|
|
695
|
-
setIsOpen(!isOpen);
|
|
696
|
-
}}
|
|
697
|
-
>
|
|
698
|
-
{childGroup.code_name} 센터
|
|
699
|
-
</Link>
|
|
700
|
-
</li>
|
|
701
|
-
{childGroup.code === 'ICT0005' ? (
|
|
702
|
-
<li
|
|
703
|
-
value={'기업인수·합병(M&A)'}
|
|
704
|
-
className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
|
|
705
|
-
>
|
|
706
|
-
<Link
|
|
707
|
-
href={'https://www.daeryunlaw-mergers.com/'}
|
|
708
|
-
target="_blank"
|
|
709
|
-
title={'기업인수·합병(M&A)'}
|
|
710
|
-
onClick={() => {
|
|
711
|
-
setIsOpen(!isOpen);
|
|
712
|
-
}}
|
|
713
|
-
>
|
|
714
|
-
기업인수·합병(M&A) 센터
|
|
715
|
-
</Link>
|
|
716
|
-
</li>
|
|
717
|
-
) : (
|
|
718
|
-
<></>
|
|
719
|
-
)}
|
|
720
|
-
</React.Fragment>
|
|
721
|
-
))}
|
|
722
|
-
</React.Fragment>
|
|
723
|
-
))}
|
|
593
|
+
{(routeLocation ? [...(groupsData ? groupsData : [])] : [...centerLink]).map(
|
|
594
|
+
(center, index: number) =>
|
|
595
|
+
center.parent_code === 'center' && (
|
|
596
|
+
<React.Fragment key={index}>
|
|
597
|
+
<li
|
|
598
|
+
key={center.code}
|
|
599
|
+
value={center.code_name}
|
|
600
|
+
className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100"
|
|
601
|
+
>
|
|
602
|
+
<Link
|
|
603
|
+
href={center.domain}
|
|
604
|
+
key={index}
|
|
605
|
+
target="_blank"
|
|
606
|
+
title={'새창열기'}
|
|
607
|
+
onClick={() => {
|
|
608
|
+
setIsOpen(!isOpen);
|
|
609
|
+
}}
|
|
610
|
+
>
|
|
611
|
+
{center.code === 'CT0000'
|
|
612
|
+
? '법무법인 대륜 변호사 대표사이트'
|
|
613
|
+
: center.code_name + center.gubun}
|
|
614
|
+
</Link>
|
|
615
|
+
</li>
|
|
616
|
+
{(routeLocation ? [...(groupsData ? groupsData : [])] : [...centerLink]).map(
|
|
617
|
+
(in_center, index2) => {
|
|
618
|
+
return (
|
|
619
|
+
in_center.parent_code === 'in_center' &&
|
|
620
|
+
center.code === in_center.etc && (
|
|
621
|
+
<React.Fragment key={in_center.code}>
|
|
622
|
+
<li
|
|
623
|
+
key={in_center.code}
|
|
624
|
+
value={in_center.code_name}
|
|
625
|
+
className="cursor-pointer px-7 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
|
|
626
|
+
>
|
|
627
|
+
<Link
|
|
628
|
+
href={in_center.domain}
|
|
629
|
+
key={index2}
|
|
630
|
+
target="_blank"
|
|
631
|
+
title={'새창열기'}
|
|
632
|
+
>
|
|
633
|
+
<p className={'pl-3'}>
|
|
634
|
+
{in_center.code_name}
|
|
635
|
+
{in_center.gubun}
|
|
636
|
+
</p>
|
|
637
|
+
</Link>
|
|
638
|
+
</li>
|
|
639
|
+
{/*경영권분쟁센터 밑에 기업인수 합병센터 강제 추가*/}
|
|
640
|
+
{in_center.code === 'ICT0005' ? (
|
|
641
|
+
<li
|
|
642
|
+
key={in_center.code}
|
|
643
|
+
value={in_center.code_name}
|
|
644
|
+
className="cursor-pointer px-7 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
|
|
645
|
+
>
|
|
646
|
+
<Link
|
|
647
|
+
href={'https://www.daeryunlaw-mergers.com/'}
|
|
648
|
+
target="_blank"
|
|
649
|
+
title={'새창열기'}
|
|
650
|
+
>
|
|
651
|
+
<p className={'pl-3'}>기업인수·합병(M&A)센터</p>
|
|
652
|
+
</Link>
|
|
653
|
+
</li>
|
|
654
|
+
) : (
|
|
655
|
+
<></>
|
|
656
|
+
)}
|
|
657
|
+
</React.Fragment>
|
|
658
|
+
)
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
)}
|
|
662
|
+
</React.Fragment>
|
|
663
|
+
)
|
|
664
|
+
)}
|
|
724
665
|
</ul>
|
|
725
666
|
|
|
726
667
|
<Image
|