@daeryun/dr_components 0.1.18 → 0.1.20

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.
@@ -4,29 +4,21 @@ import * as gtag from '../../lib/gtag';
4
4
  import Link from 'next/link';
5
5
  import { getDomainHandler, insert } from '../../lib';
6
6
  import { savePowerLinkConversion } from '../../lib';
7
- import TopBtn from './TopBtn';
8
7
  import Wrapper from '../Layout/Wrapper';
8
+ import TopBtn from './TopBtn';
9
9
  import { useRouter } from 'next/router';
10
- import ArrowIcon from '../../asset/images/footer/icon_arrow_gray.webp';
11
- import SNS1 from '../../asset/images/footer/sns_01.webp';
12
- import SNS2 from '../../asset/images/footer/sns_02.webp';
13
- import SNS3 from '../../asset/images/footer/sns_03.webp';
14
- import SNS4 from '../../asset/images/footer/sns_04.webp';
15
- import SNS5 from '../../asset/images/footer/sns_05.webp';
16
- import { IGroupsData } from './IFooterTypes';
17
-
18
- interface IFooterTypes {
19
- tel: string;
20
- logoUrl: string;
21
- aceCountLink?: string;
22
- groupsData: IGroupsData[] | null;
23
- }
10
+ import { IGroupsData, INewFooterTypes } from './IFooterTypes';
11
+ import sns01 from '/public/images/footer/sns_01.webp';
12
+ import sns02 from '/public/images/footer/sns_02.webp';
13
+ import sns03 from '/public/images/footer/sns_03.webp';
14
+ import sns04 from '/public/images/footer/sns_04.webp';
15
+ import sns05 from '/public/images/footer/sns_05.webp';
24
16
 
25
17
  interface GroupsProps {
26
18
  list: IGroupsData[];
27
19
  }
28
20
 
29
- const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
21
+ const NewFooter = ({ groupsData, tel, logo, aceUrl }: INewFooterTypes) => {
30
22
  const router = useRouter();
31
23
  const mobile = require('is-mobile');
32
24
  const snsClass =
@@ -37,7 +29,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
37
29
  const [isOpen, setIsOpen] = useState(false);
38
30
  const wrapperRef = useRef(null);
39
31
 
40
- const routeLocation: boolean = router.asPath === '/' ? true : false;
32
+ const routeLocation: boolean = router.asPath === '/';
41
33
 
42
34
  const fetchData = async () => {
43
35
  try {
@@ -53,7 +45,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
53
45
  if (router.asPath !== '/') {
54
46
  try {
55
47
  const data: GroupsProps[] = await fetchData();
56
- setIsGroups(data);
48
+ setIsGroups(data); // data를 setIsGroups로 설정
57
49
  } catch (error) {
58
50
  console.error(`fetch groupsData useEffect error: ${error}`);
59
51
  }
@@ -67,11 +59,11 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
67
59
  insert('call', isMobile);
68
60
  savePowerLinkConversion('call', isMobile);
69
61
  if (isMobile) {
70
- ace_mTelClick();
71
62
  mTelClick();
63
+ ace_mTelClick();
72
64
  } else {
73
- ace_pcTelClick();
74
65
  pcTelClick();
66
+ ace_pcTelClick();
75
67
  }
76
68
  };
77
69
 
@@ -107,7 +99,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
107
99
  const ace_pcTelClick = () => {
108
100
  try {
109
101
  // @ts-ignore
110
- _PL(aceCountLink ? aceCountLink : 'www.daeryunlaw.com/tel');
102
+ _PL(aceUrl ? aceUrl : 'www.daeryunlaw.com/tel');
111
103
  } catch (e) {}
112
104
  };
113
105
 
@@ -132,19 +124,19 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
132
124
  return (
133
125
  <footer
134
126
  className={
135
- 'relative flex h-[550px] w-full items-center justify-center border-t border-solid border-[#A8A8A8] bg-white font-[SUIT] text-[18px] ' +
127
+ 'relative mb-[30px] flex h-[550px] w-full items-center justify-center border-t border-solid border-[#A8A8A8] bg-white font-[SUIT] text-[18px] ' +
136
128
  'max-xs:h-[800px] ' +
137
129
  'max-lg:mb-[70px] ' +
138
130
  'max-2xs:h-[730px]'
139
131
  }
140
132
  >
141
133
  {/*top button*/}
142
- <Wrapper className={'!absolute top-0'}>
134
+ <Wrapper id={'footer'} className={'absolute top-0'}>
143
135
  <div className={'relative z-20'}>
144
136
  <TopBtn className={'absolute right-0 top-[-50%] translate-y-[-50%]'} />
145
137
  </div>
146
138
  </Wrapper>
147
- <Wrapper>
139
+ <Wrapper id={'footer'}>
148
140
  <div className={'w-full'}>
149
141
  <div
150
142
  className={
@@ -154,7 +146,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
154
146
  >
155
147
  <Link href={'/'}>
156
148
  <Image
157
- src={logoUrl}
149
+ src={logo}
158
150
  alt="대륜 로고"
159
151
  width={216}
160
152
  height={33}
@@ -255,59 +247,57 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
255
247
  ))}
256
248
  </>
257
249
  ))
258
- : // 메인페이지가 아닌 경로로 유입되었을 때, api 호출하여 받은 데이터. 색인 x
259
- (
260
- isGroups as unknown as {
261
- list: any[];
262
- }
263
- ).list?.map((item: any, index: number) => (
264
- <>
265
- <li
266
- key={index}
267
- value={item.code_name}
268
- className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100"
269
- >
270
- <Link
271
- href={getDomainHandler(item.code, item.code_desc)}
250
+ : (isGroups as unknown as { list: any[] }).list?.map(
251
+ (item: any, index: number) => (
252
+ // 메인페이지가 아닌 경로로 유입되었을 때, api 호출하여 받은 데이터. 색인 x
253
+ <>
254
+ <li
272
255
  key={index}
273
- target="_blank"
274
- title={item.code_name}
275
- onClick={() => {
276
- setIsOpen(!isOpen);
277
- }}
256
+ value={item.code_name}
257
+ className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100"
278
258
  >
279
- {item.code === 'CT0000'
280
- ? item.code_name
281
- : `${item.code_name} 그룹`}
282
- </Link>
283
- </li>
284
- {item.children.length > 0 &&
285
- item.children.map((childGroup: any) => (
286
- <li
287
- key={childGroup.code}
288
- value={childGroup.code_name}
289
- className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
259
+ <Link
260
+ href={getDomainHandler(item.code, item.code_desc)}
261
+ key={index}
262
+ target="_blank"
263
+ title={item.code_name}
264
+ onClick={() => {
265
+ setIsOpen(!isOpen);
266
+ }}
290
267
  >
291
- <Link
292
- href={childGroup.etc2}
293
- key={index}
294
- target="_blank"
295
- title={childGroup.codename}
296
- onClick={() => {
297
- setIsOpen(!isOpen);
298
- }}
268
+ {item.code === 'CT0000'
269
+ ? item.code_name
270
+ : `${item.code_name} 그룹`}
271
+ </Link>
272
+ </li>
273
+ {item.children.length > 0 &&
274
+ item.children.map((childGroup: any) => (
275
+ <li
276
+ key={childGroup.code}
277
+ value={childGroup.code_name}
278
+ className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
299
279
  >
300
- {childGroup.code_name} 센터
301
- </Link>
302
- </li>
303
- ))}
304
- </>
305
- ))}
280
+ <Link
281
+ href={childGroup.etc2}
282
+ key={index}
283
+ target="_blank"
284
+ title={childGroup.codename}
285
+ onClick={() => {
286
+ setIsOpen(!isOpen);
287
+ }}
288
+ >
289
+ {childGroup.code_name} 센터
290
+ </Link>
291
+ </li>
292
+ ))}
293
+ </>
294
+ )
295
+ )}
306
296
  </ul>
307
297
 
308
298
  <Image
309
299
  draggable={false}
310
- src={ArrowIcon}
300
+ src={process.env.NEXT_PUBLIC_S3_URL + '/comp-asset/section10/icon_arrow_gray.webp'}
311
301
  alt={'select icon'}
312
302
  width={28}
313
303
  height={15}
@@ -333,7 +323,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
333
323
  </div>
334
324
  <div
335
325
  className={
336
- 'mb-[15px] max-xl:justify-center max-md:text-[14px] max-xs:mb-[24px] max-xs:text-[16px] max-2xs:mb-[33px] xs:flex xs:w-[90vw] xs:items-center'
326
+ 'mb-[15px] max-xl:justify-center max-md:text-[14px] max-xs:mb-[24px] max-xs:text-[16px] max-2xs:mb-[33px] xs:flex xs:w-full xs:items-center'
337
327
  }
338
328
  >
339
329
  <p className={'xs:pr-[11px] xs:text-center'}>
@@ -356,7 +346,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
356
346
  <p className={'border-solid max-xs:my-[11px] xs:border-r xs:px-[11px] xs:text-center'}>
357
347
  <span className="font-[800]">법률상담접수 </span>{' '}
358
348
  <Link
359
- href={`tel:${tel}`}
349
+ href={tel}
360
350
  onClick={onClickTel}
361
351
  aria-label={'법률상담접수 ' + tel}
362
352
  className={'inline-block'}
@@ -382,12 +372,12 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
382
372
  target="_blank"
383
373
  rel="noopener noreferrer"
384
374
  >
385
- <Image src={SNS1} alt="나의 사건 검색" width={66} height={66} className={snsClass} />
375
+ <Image src={sns01} alt="나의 사건 검색" width={66} height={66} className={snsClass} />
386
376
  </Link>
387
377
 
388
378
  <Link href="https://blog.naver.com/lawfirmdaeryun" target="_blank" rel="noopener noreferrer">
389
379
  <Image
390
- src={SNS2}
380
+ src={sns02}
391
381
  alt="법무법인(유한) 대륜 공식블로그"
392
382
  width={37}
393
383
  height={31}
@@ -402,12 +392,12 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
402
392
  onClick={() => {
403
393
  insert('kakao', isMobile);
404
394
  savePowerLinkConversion('kakao', isMobile);
405
- ace_mKakaoClick();
406
395
  mKakaoClick();
396
+ ace_mKakaoClick();
407
397
  }}
408
398
  >
409
399
  <Image
410
- src={SNS3}
400
+ src={sns03}
411
401
  alt="법무법인(유한) 대륜 카카오톡채널"
412
402
  width={66}
413
403
  height={66}
@@ -422,7 +412,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
422
412
  >
423
413
  <Image
424
414
  draggable={false}
425
- src={SNS4}
415
+ src={sns04}
426
416
  alt="법무법인(유한) 대륜 유투브"
427
417
  width={66}
428
418
  height={66}
@@ -437,7 +427,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
437
427
  >
438
428
  <Image
439
429
  draggable={false}
440
- src={SNS5}
430
+ src={sns05}
441
431
  alt="법무법인(유한) 대륜 인스타그램"
442
432
  width={66}
443
433
  height={66}
@@ -451,25 +441,35 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => {
451
441
  );
452
442
  };
453
443
 
454
- export default Footer;
444
+ export default NewFooter;
455
445
 
456
446
  const FooterLinkList = () => {
457
447
  return (
458
448
  <>
459
449
  <p>
460
- <Link href={'/common/disclaimer'}>면책공고</Link>
450
+ <Link href={'https://www.daeryunlaw.com/common/disclaimer'} target={'_blank'}>
451
+ 면책공고
452
+ </Link>
461
453
  </p>
462
454
  <p>
463
- <Link href={'/common/limited-liability'}>유한책임</Link>
455
+ <Link href={'https://www.daeryunlaw.com/common/limited-liability'} target={'_blank'}>
456
+ 유한책임
457
+ </Link>
464
458
  </p>
465
459
  <p>
466
- <Link href={'/common/privacy-policy'}>개인정보처리방침</Link>
460
+ <Link href={'https://www.daeryunlaw.com/common/privacy-policy'} target={'_blank'}>
461
+ 개인정보처리방침
462
+ </Link>
467
463
  </p>
468
464
  <p>
469
- <Link href={'/common/collect'}>이메일무단수집거부</Link>
465
+ <Link href={'https://www.daeryunlaw.com/common/collect'} target={'_blank'}>
466
+ 이메일무단수집거부
467
+ </Link>
470
468
  </p>
471
469
  <p className={'text-[#285FA7]'}>
472
- <Link href={'https://www.daeryunlaw.com/inquire'}>고객만족센터</Link>
470
+ <Link href={'https://www.daeryunlaw.com/inquire'} target={'_blank'}>
471
+ 고객만족센터
472
+ </Link>
473
473
  </p>
474
474
  </>
475
475
  );
@@ -556,10 +556,6 @@ video {
556
556
  position: fixed;
557
557
  }
558
558
 
559
- .\!absolute {
560
- position: absolute !important;
561
- }
562
-
563
559
  .absolute {
564
560
  position: absolute;
565
561
  }
@@ -641,6 +637,10 @@ video {
641
637
  margin-bottom: 20px;
642
638
  }
643
639
 
640
+ .mb-\[30px\] {
641
+ margin-bottom: 30px;
642
+ }
643
+
644
644
  .mb-\[4px\] {
645
645
  margin-bottom: 4px;
646
646
  }
@@ -2432,8 +2432,8 @@ body {
2432
2432
  display: flex;
2433
2433
  }
2434
2434
 
2435
- .xs\:w-\[90vw\] {
2436
- width: 90vw;
2435
+ .xs\:w-full {
2436
+ width: 100%;
2437
2437
  }
2438
2438
 
2439
2439
  .xs\:items-center {