@daeryun/dr_components 1.3.1 → 1.3.3

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.
@@ -16,7 +16,7 @@ const CategoryComponent = (props) => {
16
16
  link = `/${pathname}`;
17
17
  }
18
18
  else {
19
- link = `https://www.daeryunlaw-${selectedCenter.code_desc}.com/${pathname}` + getPowerLinkStr();
19
+ link = `https://www.daeryunlaw-${selectedCenter.code_desc}.com/${pathname}`;
20
20
  }
21
21
  return link + '/' + id;
22
22
  };
@@ -36,28 +36,32 @@ const CategoryComponent = (props) => {
36
36
  'max-md2:auto-rows-[minmax(0,60px)] max-md2:grid-cols-1 ' +
37
37
  //520px
38
38
  'max-2sm:auto-rows-[minmax(0,50px)]'}>
39
- {showCategory.map((item, index) => (<Link href={{
40
- pathname: linkString(item.idx, item.pathname)
41
- }} 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] ' +
42
- //900px
43
- 'max-md2:rounded-none max-md2:border-0' +
44
- //520px
45
- 'max-2sm:px-[10px] '} target={(selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) || isApp
46
- ? '_self'
47
- : '_blank'}>
48
- <p className={'text-left text-[18px] tracking-[-1px] text-[#4B4B4B] ' +
49
- //900px
50
- 'max-md2:text-[16px] ' +
51
- //520px
52
- 'max-2sm:text-[13px]'}>
53
- {item.title}
54
- </p>
55
- <Image src={Arrow3} alt={'arrow'} width={43} height={36} className={'h-auto w-[20px] transition-all group-hover/category:translate-x-[5px] ' +
56
- //520px
57
- 'max-md2:w-[16px] ' +
58
- //520px
59
- 'max-2sm:w-[13px]'}/>
60
- </Link>))}
39
+ {showCategory.map((item, index) => {
40
+ const link = linkString(item.idx, item.pathname);
41
+ const href = link.includes('daeryunlaw') ? link + getPowerLinkStr() : link;
42
+ return (<Link href={{
43
+ pathname: href
44
+ }} 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] ' +
45
+ //900px
46
+ 'max-md2:rounded-none max-md2:border-0' +
47
+ //520px
48
+ 'max-2sm:px-[10px] '} target={(selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) || isApp
49
+ ? '_self'
50
+ : '_blank'}>
51
+ <p className={'text-left text-[18px] tracking-[-1px] text-[#4B4B4B] ' +
52
+ //900px
53
+ 'max-md2:text-[16px] ' +
54
+ //520px
55
+ 'max-2sm:text-[13px]'}>
56
+ {item.title}
57
+ </p>
58
+ <Image src={Arrow3} alt={'arrow'} width={43} height={36} className={'h-auto w-[20px] transition-all group-hover/category:translate-x-[5px] ' +
59
+ //520px
60
+ 'max-md2:w-[16px] ' +
61
+ //520px
62
+ 'max-2sm:w-[13px]'}/>
63
+ </Link>);
64
+ })}
61
65
  </span>
62
66
  <span className={'mt-[18px] flex items-center gap-[20px] ' +
63
67
  //900px
@@ -38,7 +38,7 @@ const CategoryComponent = (props: {
38
38
  } else if (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) {
39
39
  link = `/${pathname}`;
40
40
  } else {
41
- link = `https://www.daeryunlaw-${selectedCenter.code_desc}.com/${pathname}` + getPowerLinkStr();
41
+ link = `https://www.daeryunlaw-${selectedCenter.code_desc}.com/${pathname}`;
42
42
  }
43
43
 
44
44
  return link + '/' + id;
@@ -68,51 +68,56 @@ const CategoryComponent = (props: {
68
68
  'max-2sm:auto-rows-[minmax(0,50px)]'
69
69
  }
70
70
  >
71
- {showCategory.map((item, index) => (
72
- <Link
73
- href={{
74
- pathname: linkString(item.idx, item.pathname)
75
- }}
76
- key={index}
77
- className={
78
- '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] ' +
79
- //900px
80
- 'max-md2:rounded-none max-md2:border-0' +
81
- //520px
82
- 'max-2sm:px-[10px] '
83
- }
84
- target={
85
- (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) || isApp
86
- ? '_self'
87
- : '_blank'
88
- }
89
- >
90
- <p
71
+ {showCategory.map((item, index) => {
72
+ const link = linkString(item.idx, item.pathname);
73
+ const href = link.includes('daeryunlaw') ? link + getPowerLinkStr() : link;
74
+
75
+ return (
76
+ <Link
77
+ href={{
78
+ pathname: href
79
+ }}
80
+ key={index}
91
81
  className={
92
- 'text-left text-[18px] tracking-[-1px] text-[#4B4B4B] ' +
82
+ '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] ' +
93
83
  //900px
94
- 'max-md2:text-[16px] ' +
84
+ 'max-md2:rounded-none max-md2:border-0' +
95
85
  //520px
96
- 'max-2sm:text-[13px]'
86
+ 'max-2sm:px-[10px] '
97
87
  }
98
- >
99
- {item.title}
100
- </p>
101
- <Image
102
- src={Arrow3}
103
- alt={'arrow'}
104
- width={43}
105
- height={36}
106
- className={
107
- 'h-auto w-[20px] transition-all group-hover/category:translate-x-[5px] ' +
108
- //520px
109
- 'max-md2:w-[16px] ' +
110
- //520px
111
- 'max-2sm:w-[13px]'
88
+ target={
89
+ (selectedCenter.code_desc === currentCenterTitle && !allMainCenterTargetBlank) || isApp
90
+ ? '_self'
91
+ : '_blank'
112
92
  }
113
- />
114
- </Link>
115
- ))}
93
+ >
94
+ <p
95
+ className={
96
+ 'text-left text-[18px] tracking-[-1px] text-[#4B4B4B] ' +
97
+ //900px
98
+ 'max-md2:text-[16px] ' +
99
+ //520px
100
+ 'max-2sm:text-[13px]'
101
+ }
102
+ >
103
+ {item.title}
104
+ </p>
105
+ <Image
106
+ src={Arrow3}
107
+ alt={'arrow'}
108
+ width={43}
109
+ height={36}
110
+ className={
111
+ 'h-auto w-[20px] transition-all group-hover/category:translate-x-[5px] ' +
112
+ //520px
113
+ 'max-md2:w-[16px] ' +
114
+ //520px
115
+ 'max-2sm:w-[13px]'
116
+ }
117
+ />
118
+ </Link>
119
+ );
120
+ })}
116
121
  </span>
117
122
  <span
118
123
  className={
@@ -18,17 +18,17 @@ import * as gtag from '../../lib/gtag';
18
18
  export const useLoginUuidSync = () => {
19
19
  const hasProcessed = useRef(false);
20
20
  // const pathName = usePathname();
21
- console.log('useLoginUuidSync 훅 호출됨');
21
+ // console.log('useLoginUuidSync 훅 호출됨');
22
22
  useEffect(() => {
23
23
  console.log('useLoginUuidSync useEffect 실행, hasProcessed:', hasProcessed.current);
24
24
  // 이미 처리했으면 스킵
25
25
  if (hasProcessed.current) {
26
- console.log('useLoginUuidSync: 이미 처리됨, 스킵');
26
+ // console.log('useLoginUuidSync: 이미 처리됨, 스킵');
27
27
  return;
28
28
  }
29
29
  const syncUuid = () => __awaiter(void 0, void 0, void 0, function* () {
30
30
  var _a, _b, _c;
31
- console.log('useLoginUuidSync syncUuid 함수 시작');
31
+ // console.log('useLoginUuidSync syncUuid 함수 시작');
32
32
  try {
33
33
  // URL에 이미 uuid가 있으면 스킵
34
34
  const urlParams = new URLSearchParams(window.location.search);
@@ -43,7 +43,7 @@ export const useLoginUuidSync = () => {
43
43
  headers: { 'Content-Type': 'application/json' },
44
44
  credentials: 'include'
45
45
  }).then(res => res.json());
46
- console.log('useLoginUuidSync result:', result);
46
+ // console.log('useLoginUuidSync result:', result);
47
47
  // 로그인 안 됨
48
48
  if (!((_a = result.data) === null || _a === void 0 ? void 0 : _a.email) || !((_b = result.data) === null || _b === void 0 ? void 0 : _b.name) || !((_c = result.data) === null || _c === void 0 ? void 0 : _c.phone_number)) {
49
49
  console.log('useLoginUuidSync: 로그인 안 됨 - email/name/phone_number 누락');
@@ -54,7 +54,7 @@ export const useLoginUuidSync = () => {
54
54
  console.log('useLoginUuidSync: idx 없음');
55
55
  return;
56
56
  }
57
- console.log('useLoginUuidSync: 로그인 확인, idx:', idx);
57
+ // console.log('useLoginUuidSync: 로그인 확인, idx:', idx);
58
58
  // URL에 uuid 추가
59
59
  const url = new URL(window.location.href);
60
60
  url.searchParams.set('uuid', String(idx));
@@ -67,15 +67,15 @@ export const useLoginUuidSync = () => {
67
67
  value: '1',
68
68
  user_id: String(idx)
69
69
  });
70
- console.log('useLoginUuidSync: GA 이벤트 발생 - login_complete');
70
+ // console.log('useLoginUuidSync: GA 이벤트 발생 - login_complete');
71
71
  hasProcessed.current = true;
72
72
  // 쿠키에 uuid 저장 (세션 쿠키 - 브라우저 닫으면 삭제)
73
73
  // middleware에서 페이지 이동 시 URL에 uuid를 자동 추가하는 데 사용
74
74
  document.cookie = `_dr_uuid=${idx}; path=/; SameSite=Lax`;
75
- console.log('useLoginUuidSync: 쿠키 저장 완료 - _dr_uuid:', idx);
75
+ // console.log('useLoginUuidSync: 쿠키 저장 완료 - _dr_uuid:', idx);
76
76
  // URL 업데이트 (히스토리에 추가하지 않고 교체)
77
77
  window.history.replaceState({}, '', newUrl);
78
- console.log('useLoginUuidSync: URL 업데이트 완료', newUrl);
78
+ // console.log('useLoginUuidSync: URL 업데이트 완료', newUrl);
79
79
  }
80
80
  catch (error) {
81
81
  console.error('useLoginUuidSync 에러:', error);
@@ -13,19 +13,19 @@ export const useLoginUuidSync = () => {
13
13
  const hasProcessed = useRef(false);
14
14
  // const pathName = usePathname();
15
15
 
16
- console.log('useLoginUuidSync 훅 호출됨');
16
+ // console.log('useLoginUuidSync 훅 호출됨');
17
17
 
18
18
  useEffect(() => {
19
19
  console.log('useLoginUuidSync useEffect 실행, hasProcessed:', hasProcessed.current);
20
20
 
21
21
  // 이미 처리했으면 스킵
22
22
  if (hasProcessed.current) {
23
- console.log('useLoginUuidSync: 이미 처리됨, 스킵');
23
+ // console.log('useLoginUuidSync: 이미 처리됨, 스킵');
24
24
  return;
25
25
  }
26
26
 
27
27
  const syncUuid = async () => {
28
- console.log('useLoginUuidSync syncUuid 함수 시작');
28
+ // console.log('useLoginUuidSync syncUuid 함수 시작');
29
29
  try {
30
30
  // URL에 이미 uuid가 있으면 스킵
31
31
  const urlParams = new URLSearchParams(window.location.search);
@@ -42,7 +42,7 @@ export const useLoginUuidSync = () => {
42
42
  credentials: 'include'
43
43
  }).then(res => res.json());
44
44
 
45
- console.log('useLoginUuidSync result:', result);
45
+ // console.log('useLoginUuidSync result:', result);
46
46
 
47
47
  // 로그인 안 됨
48
48
  if (!result.data?.email || !result.data?.name || !result.data?.phone_number) {
@@ -56,7 +56,7 @@ export const useLoginUuidSync = () => {
56
56
  return;
57
57
  }
58
58
 
59
- console.log('useLoginUuidSync: 로그인 확인, idx:', idx);
59
+ // console.log('useLoginUuidSync: 로그인 확인, idx:', idx);
60
60
 
61
61
  // URL에 uuid 추가
62
62
  const url = new URL(window.location.href);
@@ -72,17 +72,17 @@ export const useLoginUuidSync = () => {
72
72
  user_id: String(idx)
73
73
  });
74
74
 
75
- console.log('useLoginUuidSync: GA 이벤트 발생 - login_complete');
75
+ // console.log('useLoginUuidSync: GA 이벤트 발생 - login_complete');
76
76
  hasProcessed.current = true;
77
77
 
78
78
  // 쿠키에 uuid 저장 (세션 쿠키 - 브라우저 닫으면 삭제)
79
79
  // middleware에서 페이지 이동 시 URL에 uuid를 자동 추가하는 데 사용
80
80
  document.cookie = `_dr_uuid=${idx}; path=/; SameSite=Lax`;
81
- console.log('useLoginUuidSync: 쿠키 저장 완료 - _dr_uuid:', idx);
81
+ // console.log('useLoginUuidSync: 쿠키 저장 완료 - _dr_uuid:', idx);
82
82
 
83
83
  // URL 업데이트 (히스토리에 추가하지 않고 교체)
84
84
  window.history.replaceState({}, '', newUrl);
85
- console.log('useLoginUuidSync: URL 업데이트 완료', newUrl);
85
+ // console.log('useLoginUuidSync: URL 업데이트 완료', newUrl);
86
86
  } catch (error) {
87
87
  console.error('useLoginUuidSync 에러:', error);
88
88
  }
@@ -92,4 +92,4 @@ export const useLoginUuidSync = () => {
92
92
  }, []);
93
93
  };
94
94
 
95
- export default useLoginUuidSync;
95
+ export default useLoginUuidSync;