@daeryun/dr_components 1.2.92 → 1.2.94

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.
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { useEffect, useRef } from 'react';
11
11
  import * as gtag from '../../lib/gtag';
12
+ import { usePathname } from 'next/navigation';
12
13
  /**
13
14
  * 로그인 완료 후 URL에 uuid(idx)를 추가하고 GA 이벤트를 발생시키는 훅
14
15
  * - 로그인된 상태이고, URL에 uuid가 없으면 uuid를 추가
@@ -16,6 +17,7 @@ import * as gtag from '../../lib/gtag';
16
17
  */
17
18
  export const useLoginUuidSync = () => {
18
19
  const hasProcessed = useRef(false);
20
+ const pathName = usePathname();
19
21
  // console.log('useLoginUuidSync 훅 호출됨');
20
22
  useEffect(() => {
21
23
  // console.log('useLoginUuidSync useEffect 실행, hasProcessed:', hasProcessed.current);
@@ -74,6 +76,6 @@ export const useLoginUuidSync = () => {
74
76
  }
75
77
  });
76
78
  syncUuid();
77
- }, []);
79
+ }, [pathName]);
78
80
  };
79
81
  export default useLoginUuidSync;
@@ -1,13 +1,16 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
  import * as gtag from '../../lib/gtag';
3
+ import { usePathname } from 'next/navigation';
3
4
 
4
5
  /**
5
6
  * 로그인 완료 후 URL에 uuid(idx)를 추가하고 GA 이벤트를 발생시키는 훅
6
7
  * - 로그인된 상태이고, URL에 uuid가 없으면 uuid를 추가
7
8
  * - 로그인 완료 GA 이벤트 발생
8
9
  */
10
+
9
11
  export const useLoginUuidSync = () => {
10
12
  const hasProcessed = useRef(false);
13
+ const pathName = usePathname();
11
14
 
12
15
  // console.log('useLoginUuidSync 훅 호출됨');
13
16
 
@@ -78,7 +81,7 @@ export const useLoginUuidSync = () => {
78
81
  };
79
82
 
80
83
  syncUuid();
81
- }, []);
84
+ }, [pathName]);
82
85
  };
83
86
 
84
87
  export default useLoginUuidSync;
@@ -236,9 +236,9 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
236
236
  ' max-lg:mt-[168px] ' +
237
237
  ' max-sm:mt-[80px] '}>
238
238
  {loginProvider.map((item, index) => {
239
- return (<button aria-label={`${item.identityProvider} 로그인 버튼`} key={index} type="button"
240
- // onClick={() => {handleLoginClick(item.identityProvider); snsLoginClickGAEvent(item.identityProvider); }}
241
- onClick={() => { snsLoginClickGAEvent(item.identityProvider); }} className={' relative flex h-[72px] w-[540px] items-center ' +
239
+ return (<button aria-label={`${item.identityProvider} 로그인 버튼`} key={index} type="button" onClick={() => { handleLoginClick(item.identityProvider); snsLoginClickGAEvent(item.identityProvider); }}
240
+ // onClick={() => {snsLoginClickGAEvent(item.identityProvider); }}
241
+ className={' relative flex h-[72px] w-[540px] items-center ' +
242
242
  ' body_large2 justify-center rounded-[36px] ' +
243
243
  ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
244
244
  ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
@@ -290,8 +290,8 @@ const LoginContainer = ({
290
290
  aria-label={`${item.identityProvider} 로그인 버튼`}
291
291
  key={index}
292
292
  type="button"
293
- // onClick={() => {handleLoginClick(item.identityProvider); snsLoginClickGAEvent(item.identityProvider); }}
294
- onClick={() => {snsLoginClickGAEvent(item.identityProvider); }}
293
+ onClick={() => {handleLoginClick(item.identityProvider); snsLoginClickGAEvent(item.identityProvider); }}
294
+ // onClick={() => {snsLoginClickGAEvent(item.identityProvider); }}
295
295
  className={
296
296
  ' relative flex h-[72px] w-[540px] items-center ' +
297
297
  ' body_large2 justify-center rounded-[36px] ' +