@daeryun/dr_components 1.2.43 → 1.2.44

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.
@@ -18,7 +18,6 @@ import BrochureBtn from '../BrochureBtn/BrochureBtn';
18
18
  import MedicalBrochureBtn from '../BrochureBtn/MedicalBrochureBtn';
19
19
  import { useActionGetTermList } from './_actions/action';
20
20
  import { ITermType } from '../page/Login/_types/termType';
21
- import useIsApp from '../common/hook/useIsApp';
22
21
 
23
22
  const NewFooter = ({
24
23
  groupsData,
@@ -40,8 +39,6 @@ const NewFooter = ({
40
39
 
41
40
  const routeLocation: boolean = pathname === '/';
42
41
 
43
- const isApp = useIsApp();
44
-
45
42
  const fetchData = async () => {
46
43
  try {
47
44
  const req = await fetch(`/api/center-footer/list`);
@@ -236,7 +233,6 @@ const NewFooter = ({
236
233
  isBrochureBtn={isBrochureBtn}
237
234
  isMedical={isMedical}
238
235
  centerLink={centerLink}
239
- isApp={isApp}
240
236
  />
241
237
  <BrochureBtn
242
238
  width={'280px'}
@@ -267,7 +263,6 @@ const NewFooter = ({
267
263
  isBrochureBtn={isBrochureBtn}
268
264
  isMedical={isMedical}
269
265
  centerLink={centerLink}
270
- isApp={isApp}
271
266
  />
272
267
  <MedicalBrochureBtn
273
268
  width={'280px'}
@@ -297,7 +292,6 @@ const NewFooter = ({
297
292
  isBrochureBtn={isBrochureBtn}
298
293
  isMedical={isMedical}
299
294
  centerLink={centerLink}
300
- isApp={isApp}
301
295
  />
302
296
  <BrochureBtn
303
297
  width={'280px'}
@@ -353,7 +347,7 @@ const NewFooter = ({
353
347
  'max-xs:mb-[42px] max-xs:grid max-xs:grid-cols-2 max-xs:gap-2 max-xs:text-[16px] max-xs:leading-snug '
354
348
  }
355
349
  >
356
- <FooterLinkList isApp={isApp} />
350
+ <FooterLinkList />
357
351
  </div>
358
352
  <div
359
353
  className={
@@ -511,7 +505,7 @@ const NewFooter = ({
511
505
 
512
506
  export default NewFooter;
513
507
 
514
- export const FooterLinkList = ({ isApp }: { isApp: boolean }) => {
508
+ export const FooterLinkList = () => {
515
509
  /**
516
510
  * 로그인 반영 후 푸터
517
511
  */
@@ -525,11 +519,7 @@ export const FooterLinkList = ({ isApp }: { isApp: boolean }) => {
525
519
  return (
526
520
  <p key={key}>
527
521
  <Link
528
- href={
529
- isApp
530
- ? `https://mysjkp.daeryunlaw.com/common/term/${item.terms_code}`
531
- : `https://www.daeryunlaw.com/common/term/${item.terms_code}`
532
- }
522
+ href={`https://www.daeryunlaw.com/common/term/${item.terms_code}`}
533
523
  target={'_blank'}
534
524
  >
535
525
  {item.terms_name}
@@ -539,10 +529,7 @@ export const FooterLinkList = ({ isApp }: { isApp: boolean }) => {
539
529
  })
540
530
  : null}
541
531
  <p className={'text-[#285FA7]'}>
542
- <Link
543
- href={isApp ? 'https://mysjkp.daeryunlaw.com/inquire' : 'https://www.daeryunlaw.com/inquire'}
544
- target={'_blank'}
545
- >
532
+ <Link href={'https://www.daeryunlaw.com/inquire'} target={'_blank'}>
546
533
  고객만족센터
547
534
  </Link>
548
535
  </p>
@@ -592,10 +579,8 @@ const FooterSelectBox = (props: {
592
579
  isOpen: boolean;
593
580
  routeLocation: boolean;
594
581
  groupsData: ICenterLinkTypes[] | null;
595
- isApp: boolean;
596
582
  }) => {
597
- const { isBrochureBtn, isMedical, wrapperRef, setIsOpen, isOpen, centerLink, routeLocation, groupsData, isApp } =
598
- props;
583
+ const { isBrochureBtn, isMedical, wrapperRef, setIsOpen, isOpen, centerLink, routeLocation, groupsData } = props;
599
584
 
600
585
  const list = groupsData != null && groupsData.length > 0 ? groupsData : centerLink;
601
586
 
@@ -658,10 +643,7 @@ const FooterSelectBox = (props: {
658
643
  <li className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100">
659
644
  <Link
660
645
  href={{
661
- pathname: 'https://www.sjkplawfirm.com',
662
- query: {
663
- ...(isApp ? { isApp: true } : {})
664
- }
646
+ pathname: 'https://www.sjkplawfirm.com'
665
647
  }}
666
648
  target="_blank"
667
649
  title={'새창열기'}
@@ -684,10 +666,7 @@ const FooterSelectBox = (props: {
684
666
  >
685
667
  <Link
686
668
  href={{
687
- pathname: group.domain,
688
- query: {
689
- ...(isApp ? { isApp: true } : {})
690
- }
669
+ pathname: group.domain
691
670
  }}
692
671
  target="_blank"
693
672
  title={'새창열기'}
@@ -713,10 +692,7 @@ const FooterSelectBox = (props: {
713
692
  >
714
693
  <Link
715
694
  href={{
716
- pathname: in_center.domain,
717
- query: {
718
- ...(isApp ? { isApp: true } : {})
719
- }
695
+ pathname: in_center.domain
720
696
  }}
721
697
  key={index2}
722
698
  target="_blank"
@@ -736,7 +712,7 @@ const FooterSelectBox = (props: {
736
712
  className="cursor-pointer px-7 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100"
737
713
  >
738
714
  <Link
739
- href={'https://www.daeryunlaw-mergers.com?isApp=true'}
715
+ href={'https://www.daeryunlaw-mergers.com'}
740
716
  target="_blank"
741
717
  title={'새창열기'}
742
718
  >
@@ -14,13 +14,11 @@ import LineSeoulMd from '../../asset/images/globalOffice/seoul_line_md.svg';
14
14
  import LineBusanMd from '../../asset/images/globalOffice/busan_line_md.svg';
15
15
  import ViewMoreArrow from '../../asset/images/globalOffice/view_more_arrow.svg';
16
16
  import IconArrow from '../../asset/images/globalOffice/global_arrow.svg';
17
- import useIsApp from '../../components/common/hook/useIsApp';
18
17
  // 좌표계산용
19
18
  const MAP_W = 3873;
20
19
  const MAP_H = 1853;
21
20
  const GlobalOfficeSection = ({ initialData, isCenter, customFont }) => {
22
21
  const { width } = useBrowser(true);
23
- const isApp = useIsApp();
24
22
  return (<section className={'relative z-[6] h-[1300px] w-full overflow-hidden bg-white transition-opacity duration-700 ' +
25
23
  'max-[1935px]:aspect-[1935/1000] max-[1935px]:h-auto ' +
26
24
  'max-4xl:aspect-[1935/1100] ' +
@@ -152,7 +150,7 @@ const GlobalOfficeSection = ({ initialData, isCenter, customFont }) => {
152
150
  'max-4xl:-translate-y-[8vw] ' +
153
151
  'max-xl:-translate-y-[18.8vw] ' +
154
152
  'max-md:relative max-md:!left-0 max-md:!top-0 max-md:order-3 max-md:w-full max-md:translate-y-0 max-md:items-start '} target={isCenter ? '_blank' : '_self'} href={isCenter
155
- ? `https://${isApp ? 'mysjkp' : 'www'}.daeryunlaw.com/map/seoulbon?scroll=false`
153
+ ? `https://www.daeryunlaw.com/map/seoulbon?scroll=false`
156
154
  : '/map/seoulbon?scroll=false'}>
157
155
  <span className={'relative block h-fit w-fit '}>
158
156
  {width >= 1280 ? (<LineSeoul className={'h-auto w-[382px] stroke-[#04325A] transition-colors duration-500 group-hover:stroke-[#285FA7] ' +
@@ -186,9 +184,7 @@ const GlobalOfficeSection = ({ initialData, isCenter, customFont }) => {
186
184
  <Link style={{ right: `${(593 / MAP_W) * 100}%`, top: `${(690 / MAP_H) * 100}%` }} className={'group absolute flex h-fit w-fit translate-x-[70%] cursor-pointer flex-col items-end object-cover ' +
187
185
  'max-4xl:translate-x-[75%] ' +
188
186
  'max-xl:translate-x-0 max-xl:items-start ' +
189
- 'max-md:relative max-md:!right-0 max-md:!top-0 max-md:order-4 max-md:w-full'} target={isCenter ? '_blank' : '_self'} href={isCenter
190
- ? `https://${isApp ? 'mysjkp' : 'www'}.daeryunlaw.com/map/busan1?scroll=false`
191
- : '/map/busan1?scroll=false'}>
187
+ 'max-md:relative max-md:!right-0 max-md:!top-0 max-md:order-4 max-md:w-full'} target={isCenter ? '_blank' : '_self'} href={isCenter ? `https://www.daeryunlaw.com/map/busan1?scroll=false` : '/map/busan1?scroll=false'}>
192
188
  <span className={'relative block h-fit w-fit '}>
193
189
  {width >= 1280 ? (<LineBusan className={'h-auto w-[160px] stroke-[#04325A] transition-colors duration-500 group-hover:stroke-[#285FA7] ' +
194
190
  'max-[1935px]:w-[8.27vw] ' +
@@ -18,7 +18,6 @@ import LineBusanMd from '../../asset/images/globalOffice/busan_line_md.svg';
18
18
 
19
19
  import ViewMoreArrow from '../../asset/images/globalOffice/view_more_arrow.svg';
20
20
  import IconArrow from '../../asset/images/globalOffice/global_arrow.svg';
21
- import useIsApp from '../../components/common/hook/useIsApp';
22
21
 
23
22
  // 좌표계산용
24
23
  const MAP_W = 3873;
@@ -34,7 +33,6 @@ const GlobalOfficeSection = ({
34
33
  customFont: string;
35
34
  }) => {
36
35
  const { width } = useBrowser(true);
37
- const isApp = useIsApp();
38
36
 
39
37
  return (
40
38
  <section
@@ -320,7 +318,7 @@ const GlobalOfficeSection = ({
320
318
  target={isCenter ? '_blank' : '_self'}
321
319
  href={
322
320
  isCenter
323
- ? `https://${isApp ? 'mysjkp' : 'www'}.daeryunlaw.com/map/seoulbon?scroll=false`
321
+ ? `https://www.daeryunlaw.com/map/seoulbon?scroll=false`
324
322
  : '/map/seoulbon?scroll=false'
325
323
  }
326
324
  >
@@ -396,9 +394,7 @@ const GlobalOfficeSection = ({
396
394
  }
397
395
  target={isCenter ? '_blank' : '_self'}
398
396
  href={
399
- isCenter
400
- ? `https://${isApp ? 'mysjkp' : 'www'}.daeryunlaw.com/map/busan1?scroll=false`
401
- : '/map/busan1?scroll=false'
397
+ isCenter ? `https://www.daeryunlaw.com/map/busan1?scroll=false` : '/map/busan1?scroll=false'
402
398
  }
403
399
  >
404
400
  <span className={'relative block h-fit w-fit '}>
@@ -8,5 +8,6 @@ declare const CategoryComponent: (props: {
8
8
  selectedCenter: ICenter;
9
9
  currentCenterTitle: string;
10
10
  allMainCenterTargetBlank?: boolean;
11
+ isApp?: boolean;
11
12
  }) => React.JSX.Element;
12
13
  export default CategoryComponent;
@@ -4,13 +4,14 @@ import Image from 'next/image';
4
4
  import React from 'react';
5
5
  import Arrow5 from '../../asset/images/categoryView/section9_arrow_05.webp';
6
6
  import Arrow3 from '../../asset/images/categoryView/section9_arrow_03.webp';
7
- import useIsApp from '../common/hook/useIsApp';
8
7
  const CategoryComponent = (props) => {
9
- const { showCategory, onClickPage, currentPage, maxPageNum, selectedCenter, currentCenterTitle, allMainCenterTargetBlank } = props;
10
- const isApp = useIsApp();
8
+ const { showCategory, onClickPage, currentPage, maxPageNum, selectedCenter, currentCenterTitle, allMainCenterTargetBlank, isApp } = props;
11
9
  const linkString = (id, pathname) => {
12
10
  let link = '';
13
- if (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) {
11
+ if (isApp) {
12
+ `/${pathname}`;
13
+ }
14
+ else if (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) {
14
15
  link = `/${pathname}`;
15
16
  }
16
17
  else {
@@ -35,8 +36,7 @@ const CategoryComponent = (props) => {
35
36
  //520px
36
37
  'max-2sm:auto-rows-[minmax(0,50px)]'}>
37
38
  {showCategory.map((item, index) => (<Link href={{
38
- pathname: linkString(item.idx, item.pathname),
39
- query: Object.assign({}, (isApp ? { isApp: true } : {}))
39
+ pathname: linkString(item.idx, item.pathname)
40
40
  }} key={index} className={'group/category flex h-full w-full items-center justify-between gap-[6px] rounded-[10px] border-[1px] border-solid border-[#D9D9D9] bg-[#fff] px-[20px] ' +
41
41
  //900px
42
42
  'max-md2:rounded-none max-md2:border-0' +
@@ -7,7 +7,6 @@ import { ICategory, ICenter } from './ICategoryViewTypes';
7
7
  import Icon from '../../asset/images/categoryView/section9_icon.webp';
8
8
  import Arrow5 from '../../asset/images/categoryView/section9_arrow_05.webp';
9
9
  import Arrow3 from '../../asset/images/categoryView/section9_arrow_03.webp';
10
- import useIsApp from '../common/hook/useIsApp';
11
10
 
12
11
  const CategoryComponent = (props: {
13
12
  showCategory: ICategory[];
@@ -17,6 +16,7 @@ const CategoryComponent = (props: {
17
16
  selectedCenter: ICenter;
18
17
  currentCenterTitle: string;
19
18
  allMainCenterTargetBlank?: boolean;
19
+ isApp?: boolean;
20
20
  }) => {
21
21
  const {
22
22
  showCategory,
@@ -25,15 +25,16 @@ const CategoryComponent = (props: {
25
25
  maxPageNum,
26
26
  selectedCenter,
27
27
  currentCenterTitle,
28
- allMainCenterTargetBlank
28
+ allMainCenterTargetBlank,
29
+ isApp
29
30
  } = props;
30
31
 
31
- const isApp = useIsApp();
32
-
33
32
  const linkString = (id: number, pathname: string) => {
34
33
  let link = '';
35
34
 
36
- if (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) {
35
+ if (isApp) {
36
+ `/${pathname}`;
37
+ } else if (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) {
37
38
  link = `/${pathname}`;
38
39
  } else {
39
40
  link = `https://www.daeryunlaw-${selectedCenter.code_desc}.com/${pathname}`;
@@ -69,10 +70,7 @@ const CategoryComponent = (props: {
69
70
  {showCategory.map((item, index) => (
70
71
  <Link
71
72
  href={{
72
- pathname: linkString(item.idx, item.pathname),
73
- query: {
74
- ...(isApp ? { isApp: true } : {})
75
- }
73
+ pathname: linkString(item.idx, item.pathname)
76
74
  }}
77
75
  key={index}
78
76
  className={
@@ -7,5 +7,6 @@ declare const CategoryView: (props: {
7
7
  currentCenterTitle: string;
8
8
  hiddenTitle?: boolean;
9
9
  allMainCenterTargetBlank?: boolean;
10
+ isApp?: boolean;
10
11
  }) => React.JSX.Element;
11
12
  export default CategoryView;
@@ -95,7 +95,7 @@ const CategoryView = (props) => {
95
95
  {/*분야*/}
96
96
  <CategoryComponent showCategory={showCategory} onClickPage={(num) => {
97
97
  setCurrentPage(num);
98
- }} currentPage={currentPage} maxPageNum={maxPageNum} selectedCenter={selectedCenter} currentCenterTitle={props.currentCenterTitle} allMainCenterTargetBlank={props.allMainCenterTargetBlank}/>
98
+ }} currentPage={currentPage} maxPageNum={maxPageNum} selectedCenter={selectedCenter} currentCenterTitle={props.currentCenterTitle} allMainCenterTargetBlank={props.allMainCenterTargetBlank} isApp={props.isApp}/>
99
99
  </div>);
100
100
  };
101
101
  export default CategoryView;
@@ -8,6 +8,7 @@ declare const CategoryView: {
8
8
  currentCenterTitle: string;
9
9
  hiddenTitle?: boolean;
10
10
  allMainCenterTargetBlank?: boolean;
11
+ isApp?: boolean;
11
12
  }) => import("react").JSX.Element;
12
13
  title: string;
13
14
  };
@@ -13,6 +13,7 @@ const CategoryView = (props: {
13
13
  currentCenterTitle: string; // 기준이 되는 센터 영어이름 (설정 시, 센터 가장 상단위치, 기본값)
14
14
  hiddenTitle?: boolean; // '1280px' 보다 클 시, 타이틀 숨김처리
15
15
  allMainCenterTargetBlank?: boolean; // 카테고리 링크 전부 새창, 해당 센터 카테고리로 이동
16
+ isApp?: boolean;
16
17
  }) => {
17
18
  //센터, 분야정보
18
19
  const [centerList, setCenterList] = useState<ICenter[]>(props.initCenterList ? props.initCenterList : []);
@@ -130,6 +131,7 @@ const CategoryView = (props: {
130
131
  selectedCenter={selectedCenter}
131
132
  currentCenterTitle={props.currentCenterTitle}
132
133
  allMainCenterTargetBlank={props.allMainCenterTargetBlank}
134
+ isApp={props.isApp}
133
135
  />
134
136
  </div>
135
137
  );
@@ -1,4 +1,3 @@
1
1
  export * from './useBrowser';
2
2
  export * from './useCountNum';
3
3
  export * from './useElementObserve';
4
- export * from './useIsApp';
@@ -1,4 +1,3 @@
1
1
  export * from './useBrowser';
2
2
  export * from './useCountNum';
3
3
  export * from './useElementObserve';
4
- export * from './useIsApp';
@@ -1,4 +1,3 @@
1
1
  export * from './useBrowser';
2
2
  export * from './useCountNum';
3
3
  export * from './useElementObserve';
4
- export * from './useIsApp';