@daeryun/dr_components 1.3.7 → 1.3.9
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/Daeryuntalk/_hooks/talkprovider/useWorkFlow.js +4 -4
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.ts +4 -4
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.js +4 -4
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.ts +4 -4
- package/dist/components/Fix/index.jsx +10 -10
- package/dist/components/Fix/index.tsx +10 -10
- package/dist/components/Footer/index.jsx +4 -4
- package/dist/components/Footer/index.tsx +4 -4
- package/dist/components/Menu/MobileMenu.jsx +1 -1
- package/dist/components/Menu/MobileMenu.tsx +1 -1
- package/dist/components/Menu/PCMenu.jsx +1 -1
- package/dist/components/Menu/PCMenu.tsx +1 -1
- package/dist/components/Seo/SeoAdditionalLink.jsx +2 -2
- package/dist/components/Seo/SeoAdditionalLink.tsx +2 -2
- package/dist/components/Seo/SeoConsulting.jsx +3 -3
- package/dist/components/Seo/SeoConsulting.tsx +3 -3
- package/dist/components/hook/useLoginUuidSync.d.ts +0 -8
- package/dist/components/hook/useLoginUuidSync.js +78 -87
- package/dist/components/hook/useLoginUuidSync.ts +95 -95
- package/dist/components/index.js +1 -1
- package/dist/components/index.ts +1 -1
- package/dist/components/page/Choice/Choice.jsx +4 -4
- package/dist/components/page/Choice/Choice.tsx +4 -4
- package/dist/components/page/ConsultComplete/ConsultComplete.jsx +3 -3
- package/dist/components/page/ConsultComplete/ConsultComplete.tsx +3 -3
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +1 -1
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +1 -1
- package/dist/components/page/Login/LoginComp/LoginContainer.jsx +17 -26
- package/dist/components/page/Login/LoginComp/LoginContainer.tsx +17 -28
- package/dist/components/page/Login/StepOne.jsx +11 -12
- package/dist/components/page/Login/StepOne.tsx +18 -18
- package/dist/components/page/Login/StepTwo.jsx +11 -12
- package/dist/components/page/Login/StepTwo.tsx +16 -17
- package/dist/components/page/Login/Withdraw.jsx +2 -0
- package/dist/components/page/Login/Withdraw.tsx +2 -0
- package/dist/components/page/SuccessNew/components/SeoAdditionalLink.jsx +2 -2
- package/dist/components/page/SuccessNew/components/SeoAdditionalLink.tsx +2 -2
- package/dist/lib/gtag.d.ts +5 -3
- package/dist/lib/gtag.js +17 -26
- package/dist/lib/handleGtagClick.d.ts +3 -3
- package/dist/lib/handleGtagClick.js +5 -5
- package/dist/lib/handleGtagClick.ts +6 -6
- package/dist/styles/globals.css +1 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
import * as gtag from '../../lib/gtag';
|
|
3
|
-
import { usePathname } from 'next/navigation';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const useLoginUuidSync = () => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export default useLoginUuidSync;
|
|
1
|
+
// import { useEffect, useRef } from 'react';
|
|
2
|
+
// import * as gtag from '../../lib/gtag';
|
|
3
|
+
// import { usePathname } from 'next/navigation';
|
|
4
|
+
|
|
5
|
+
// /**
|
|
6
|
+
// * 로그인 완료 후 URL에 uuid(idx)를 추가하고 GA 이벤트를 발생시키는 훅
|
|
7
|
+
// * - 로그인된 상태이고, URL에 uuid가 없으면 uuid를 추가
|
|
8
|
+
// * - 로그인 완료 GA 이벤트 발생
|
|
9
|
+
// * - 쿠키에도 uuid 저장 (페이지 이동 시 middleware에서 사용)
|
|
10
|
+
// */
|
|
11
|
+
|
|
12
|
+
// export const useLoginUuidSync = () => {
|
|
13
|
+
// const hasProcessed = useRef(false);
|
|
14
|
+
// // const pathName = usePathname();
|
|
15
|
+
|
|
16
|
+
// // console.log('useLoginUuidSync 훅 호출됨');
|
|
17
|
+
|
|
18
|
+
// useEffect(() => {
|
|
19
|
+
// console.log('useLoginUuidSync useEffect 실행, hasProcessed:', hasProcessed.current);
|
|
20
|
+
|
|
21
|
+
// // 이미 처리했으면 스킵
|
|
22
|
+
// if (hasProcessed.current) {
|
|
23
|
+
// // console.log('useLoginUuidSync: 이미 처리됨, 스킵');
|
|
24
|
+
// return;
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
// const syncUuid = async () => {
|
|
28
|
+
// // console.log('useLoginUuidSync syncUuid 함수 시작');
|
|
29
|
+
// try {
|
|
30
|
+
// // URL에 이미 uuid가 있으면 스킵
|
|
31
|
+
// const urlParams = new URLSearchParams(window.location.search);
|
|
32
|
+
// console.log('useLoginUuidSync 현재 URL:', window.location.href);
|
|
33
|
+
// if (urlParams.has('uuid')) {
|
|
34
|
+
// console.log('useLoginUuidSync: URL에 이미 uuid 있음, GA 이벤트 스킵');
|
|
35
|
+
// return;
|
|
36
|
+
// }
|
|
37
|
+
|
|
38
|
+
// // 로그인 상태 및 idx 조회
|
|
39
|
+
// const result = await fetch(`/api/lawfirm/app/user`, {
|
|
40
|
+
// method: 'GET',
|
|
41
|
+
// headers: { 'Content-Type': 'application/json' },
|
|
42
|
+
// credentials: 'include'
|
|
43
|
+
// }).then(res => res.json());
|
|
44
|
+
|
|
45
|
+
// // console.log('useLoginUuidSync result:', result);
|
|
46
|
+
|
|
47
|
+
// // 로그인 안 됨
|
|
48
|
+
// if (!result.data?.email || !result.data?.name || !result.data?.phone_number) {
|
|
49
|
+
// console.log('useLoginUuidSync: 로그인 안 됨 - email/name/phone_number 누락');
|
|
50
|
+
// return;
|
|
51
|
+
// }
|
|
52
|
+
|
|
53
|
+
// const idx = result.data.idx;
|
|
54
|
+
// if (!idx) {
|
|
55
|
+
// console.log('useLoginUuidSync: idx 없음');
|
|
56
|
+
// return;
|
|
57
|
+
// }
|
|
58
|
+
|
|
59
|
+
// // console.log('useLoginUuidSync: 로그인 확인, idx:', idx);
|
|
60
|
+
|
|
61
|
+
// // URL에 uuid 추가
|
|
62
|
+
// const url = new URL(window.location.href);
|
|
63
|
+
// url.searchParams.set('uuid', String(idx));
|
|
64
|
+
// const newUrl = url.pathname + url.search;
|
|
65
|
+
|
|
66
|
+
// // GA 이벤트: 로그인 완료
|
|
67
|
+
// gtag.event({
|
|
68
|
+
// event_name: 'login_complete',
|
|
69
|
+
// category: 'login',
|
|
70
|
+
// label: `login complete - ${newUrl}`,
|
|
71
|
+
// value: '1',
|
|
72
|
+
// user_id: String(idx)
|
|
73
|
+
// });
|
|
74
|
+
|
|
75
|
+
// // console.log('useLoginUuidSync: GA 이벤트 발생 - login_complete');
|
|
76
|
+
// hasProcessed.current = true;
|
|
77
|
+
|
|
78
|
+
// // 쿠키에 uuid 저장 (세션 쿠키 - 브라우저 닫으면 삭제)
|
|
79
|
+
// // middleware에서 페이지 이동 시 URL에 uuid를 자동 추가하는 데 사용
|
|
80
|
+
// document.cookie = `_dr_uuid=${idx}; path=/; SameSite=Lax`;
|
|
81
|
+
// // console.log('useLoginUuidSync: 쿠키 저장 완료 - _dr_uuid:', idx);
|
|
82
|
+
|
|
83
|
+
// // URL 업데이트 (히스토리에 추가하지 않고 교체)
|
|
84
|
+
// window.history.replaceState({}, '', newUrl);
|
|
85
|
+
// // console.log('useLoginUuidSync: URL 업데이트 완료', newUrl);
|
|
86
|
+
// } catch (error) {
|
|
87
|
+
// console.error('useLoginUuidSync 에러:', error);
|
|
88
|
+
// }
|
|
89
|
+
// };
|
|
90
|
+
|
|
91
|
+
// syncUuid();
|
|
92
|
+
// }, []);
|
|
93
|
+
// };
|
|
94
|
+
|
|
95
|
+
// export default useLoginUuidSync;
|
package/dist/components/index.js
CHANGED
|
@@ -81,4 +81,4 @@ export { default as PaginationForGroup } from './PaginationForGroup/PaginationFo
|
|
|
81
81
|
export { default as SuccessList } from './page/Success/SuccessList';
|
|
82
82
|
export { default as GlobalOfficeSection } from './GlobalOfficeSection/GlobalOfficeSection';
|
|
83
83
|
// Hooks
|
|
84
|
-
export { useLoginUuidSync } from './hook/useLoginUuidSync';
|
|
84
|
+
// export { useLoginUuidSync } from './hook/useLoginUuidSync';
|
package/dist/components/index.ts
CHANGED
|
@@ -82,4 +82,4 @@ export { default as SuccessList } from './page/Success/SuccessList';
|
|
|
82
82
|
export { default as GlobalOfficeSection } from './GlobalOfficeSection/GlobalOfficeSection';
|
|
83
83
|
|
|
84
84
|
// Hooks
|
|
85
|
-
export { useLoginUuidSync } from './hook/useLoginUuidSync';
|
|
85
|
+
// export { useLoginUuidSync } from './hook/useLoginUuidSync';
|
|
@@ -28,7 +28,7 @@ const Index = ({ initialData, tel, aceUrl }) => {
|
|
|
28
28
|
}
|
|
29
29
|
if (isMobile) {
|
|
30
30
|
gtag.event({
|
|
31
|
-
|
|
31
|
+
action: 'mobile_tel',
|
|
32
32
|
category: 'tel',
|
|
33
33
|
label: '상담접수모바일전화버튼',
|
|
34
34
|
value: '1'
|
|
@@ -36,7 +36,7 @@ const Index = ({ initialData, tel, aceUrl }) => {
|
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
38
|
gtag.event({
|
|
39
|
-
|
|
39
|
+
action: 'pc_tel',
|
|
40
40
|
category: 'tel',
|
|
41
41
|
label: '상담접수피씨전화버튼',
|
|
42
42
|
value: '1'
|
|
@@ -50,7 +50,7 @@ const Index = ({ initialData, tel, aceUrl }) => {
|
|
|
50
50
|
}
|
|
51
51
|
if (isMobile) {
|
|
52
52
|
gtag.event({
|
|
53
|
-
|
|
53
|
+
action: 'mobile_kakao',
|
|
54
54
|
category: 'kakao',
|
|
55
55
|
label: '상담접수모바일카카오버튼',
|
|
56
56
|
value: '1'
|
|
@@ -58,7 +58,7 @@ const Index = ({ initialData, tel, aceUrl }) => {
|
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
gtag.event({
|
|
61
|
-
|
|
61
|
+
action: 'pc_kakao',
|
|
62
62
|
category: 'kakao',
|
|
63
63
|
label: '상담접수피씨카카오버튼',
|
|
64
64
|
value: '1'
|
|
@@ -35,14 +35,14 @@ const Index = ({ initialData, tel, aceUrl }: { initialData: IInitialDataTypes; t
|
|
|
35
35
|
|
|
36
36
|
if (isMobile) {
|
|
37
37
|
gtag.event({
|
|
38
|
-
|
|
38
|
+
action: 'mobile_tel',
|
|
39
39
|
category: 'tel',
|
|
40
40
|
label: '상담접수모바일전화버튼',
|
|
41
41
|
value: '1'
|
|
42
42
|
});
|
|
43
43
|
} else {
|
|
44
44
|
gtag.event({
|
|
45
|
-
|
|
45
|
+
action: 'pc_tel',
|
|
46
46
|
category: 'tel',
|
|
47
47
|
label: '상담접수피씨전화버튼',
|
|
48
48
|
value: '1'
|
|
@@ -58,14 +58,14 @@ const Index = ({ initialData, tel, aceUrl }: { initialData: IInitialDataTypes; t
|
|
|
58
58
|
|
|
59
59
|
if (isMobile) {
|
|
60
60
|
gtag.event({
|
|
61
|
-
|
|
61
|
+
action: 'mobile_kakao',
|
|
62
62
|
category: 'kakao',
|
|
63
63
|
label: '상담접수모바일카카오버튼',
|
|
64
64
|
value: '1'
|
|
65
65
|
});
|
|
66
66
|
} else {
|
|
67
67
|
gtag.event({
|
|
68
|
-
|
|
68
|
+
action: 'pc_kakao',
|
|
69
69
|
category: 'kakao',
|
|
70
70
|
label: '상담접수피씨카카오버튼',
|
|
71
71
|
value: '1'
|
|
@@ -13,7 +13,7 @@ const ConsultComplete = (props) => {
|
|
|
13
13
|
};
|
|
14
14
|
const discoveryClick = () => {
|
|
15
15
|
gtag.event({
|
|
16
|
-
|
|
16
|
+
action: 'discovery_click',
|
|
17
17
|
category: 'consult',
|
|
18
18
|
label: '증거조사포렌식서비스버튼',
|
|
19
19
|
value: '1'
|
|
@@ -21,7 +21,7 @@ const ConsultComplete = (props) => {
|
|
|
21
21
|
};
|
|
22
22
|
const forensicClick = () => {
|
|
23
23
|
gtag.event({
|
|
24
|
-
|
|
24
|
+
action: 'forensic_click',
|
|
25
25
|
category: 'consult',
|
|
26
26
|
label: '디지털포렌식서비스버튼',
|
|
27
27
|
value: '1'
|
|
@@ -29,7 +29,7 @@ const ConsultComplete = (props) => {
|
|
|
29
29
|
};
|
|
30
30
|
const guardClick = () => {
|
|
31
31
|
gtag.event({
|
|
32
|
-
|
|
32
|
+
action: 'guard_click',
|
|
33
33
|
category: 'consult',
|
|
34
34
|
label: '경호서비스버튼',
|
|
35
35
|
value: '1'
|
|
@@ -16,7 +16,7 @@ const ConsultComplete = (props: { result: boolean }) => {
|
|
|
16
16
|
|
|
17
17
|
const discoveryClick = () => {
|
|
18
18
|
gtag.event({
|
|
19
|
-
|
|
19
|
+
action: 'discovery_click',
|
|
20
20
|
category: 'consult',
|
|
21
21
|
label: '증거조사포렌식서비스버튼',
|
|
22
22
|
value: '1'
|
|
@@ -25,7 +25,7 @@ const ConsultComplete = (props: { result: boolean }) => {
|
|
|
25
25
|
|
|
26
26
|
const forensicClick = () => {
|
|
27
27
|
gtag.event({
|
|
28
|
-
|
|
28
|
+
action: 'forensic_click',
|
|
29
29
|
category: 'consult',
|
|
30
30
|
label: '디지털포렌식서비스버튼',
|
|
31
31
|
value: '1'
|
|
@@ -34,7 +34,7 @@ const ConsultComplete = (props: { result: boolean }) => {
|
|
|
34
34
|
|
|
35
35
|
const guardClick = () => {
|
|
36
36
|
gtag.event({
|
|
37
|
-
|
|
37
|
+
action: 'guard_click',
|
|
38
38
|
category: 'consult',
|
|
39
39
|
label: '경호서비스버튼',
|
|
40
40
|
value: '1'
|
|
@@ -27,7 +27,7 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
27
27
|
if (isMobile) {
|
|
28
28
|
insert('lawyer_tel', isMobile);
|
|
29
29
|
gtag.event({
|
|
30
|
-
|
|
30
|
+
action: 'lawyer_tel',
|
|
31
31
|
category: 'tel',
|
|
32
32
|
label: '변호사 전화버튼',
|
|
33
33
|
value: '1'
|
|
@@ -18,7 +18,6 @@ import { fetchUserData } from '../_api/fetchUserData';
|
|
|
18
18
|
import checkThirdPartyCookie from '../_api/checkThirdPartyCookie';
|
|
19
19
|
import { checkLogoutLog } from '../_api/checkLogoutLog';
|
|
20
20
|
import { fetchAuthCallback } from '../_api/fetchAuthCallback';
|
|
21
|
-
import * as gtag from '../../../../lib/gtag';
|
|
22
21
|
const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[1000px] w-full overflow-hidden bg-white ' +
|
|
23
22
|
' max-3xl:max-h-[1080px] max-3xl:min-h-[1000px] ' +
|
|
24
23
|
' max-lg:min-h-[930px] ' +
|
|
@@ -81,15 +80,6 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
81
80
|
return redirect;
|
|
82
81
|
}
|
|
83
82
|
};
|
|
84
|
-
// GA 이벤트: 로그인 완료 (useLoginUuidSync.ts 훅에서 처리)
|
|
85
|
-
// const loginCompleteGAEvent = (userId: string) => {
|
|
86
|
-
// gtag.event({
|
|
87
|
-
// action: 'login_complete',
|
|
88
|
-
// category: 'login',
|
|
89
|
-
// label: `로그인 완료 - ${userId}`,
|
|
90
|
-
// value: '1'
|
|
91
|
-
// });
|
|
92
|
-
// };
|
|
93
83
|
useEffect(() => {
|
|
94
84
|
if (!isCheckRecentLogin) {
|
|
95
85
|
return;
|
|
@@ -128,8 +118,6 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
128
118
|
const redirect = searchParam.get('redirect');
|
|
129
119
|
const normalized = redirect ? (redirect.startsWith('/') ? redirect : `/${redirect}`) : '/';
|
|
130
120
|
const finalUrl = appendUuidToRedirect(normalized, String(idx !== null && idx !== void 0 ? idx : ''));
|
|
131
|
-
// GA 이벤트
|
|
132
|
-
// loginCompleteGAEvent(String(idx ?? '')); useLoginUuidSync.ts 훅에서 처리
|
|
133
121
|
clearInterval(interval);
|
|
134
122
|
window.location.href = finalUrl;
|
|
135
123
|
return;
|
|
@@ -158,8 +146,6 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
158
146
|
const redirect = searchParam.get('redirect');
|
|
159
147
|
const normalized = redirect ? (redirect.startsWith('/') ? redirect : `/${redirect}`) : '/';
|
|
160
148
|
const finalUrl = appendUuidToRedirect(normalized, String(idx !== null && idx !== void 0 ? idx : ''));
|
|
161
|
-
// GA 이벤트
|
|
162
|
-
// loginCompleteGAEvent(String(idx ?? '')); useLoginUuidSync.ts 훅에서 처리
|
|
163
149
|
window.location.href = finalUrl;
|
|
164
150
|
}
|
|
165
151
|
else {
|
|
@@ -202,14 +188,14 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
202
188
|
iconClassName: `w-[26px] h-[30.87px] max-lg:w-[22px] max-lg:h-[26.12px] max-sm:w-[19.16px] max-sm:h-[22.75px] `
|
|
203
189
|
}
|
|
204
190
|
];
|
|
205
|
-
const snsLoginClickGAEvent = (snsLoginProvider) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
};
|
|
191
|
+
// const snsLoginClickGAEvent = (snsLoginProvider: 'kakao' | 'google' | 'naver' | 'apple') => {
|
|
192
|
+
// gtag.event({
|
|
193
|
+
// event_name: 'sns_login_click',
|
|
194
|
+
// login_category: `${snsLoginProvider}_sns_login`,
|
|
195
|
+
// event_label: `${snsLoginProvider} login button clicked`,
|
|
196
|
+
// sns_login_click_value: '1'
|
|
197
|
+
// });
|
|
198
|
+
// };
|
|
213
199
|
return (<section className={layoutClassName}>
|
|
214
200
|
<PageWrapper>
|
|
215
201
|
<div>
|
|
@@ -226,16 +212,21 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
226
212
|
<div className={' body_large2 mt-[12px] text-[#000000] ' +
|
|
227
213
|
' max-lg:title_small_tb max-lg:mt-[12px] ' +
|
|
228
214
|
' max-sm:label_medium2_tb max-sm:mt-[8px] '}>
|
|
229
|
-
<p>
|
|
230
|
-
|
|
231
|
-
|
|
215
|
+
<p>
|
|
216
|
+
SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
|
|
217
|
+
<br />
|
|
218
|
+
로그인하고 나의 사건 진행 상황을 확인하세요!
|
|
219
|
+
</p>
|
|
232
220
|
</div>
|
|
233
221
|
</div>
|
|
234
222
|
<div className={' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
|
|
235
223
|
' max-lg:mt-[168px] ' +
|
|
236
224
|
' max-sm:mt-[80px] '}>
|
|
237
225
|
{loginProvider.map((item, index) => {
|
|
238
|
-
return (<button aria-label={`${item.identityProvider} 로그인 버튼`} key={index} type="button" onClick={() => {
|
|
226
|
+
return (<button aria-label={`${item.identityProvider} 로그인 버튼`} key={index} type="button" onClick={() => {
|
|
227
|
+
handleLoginClick(item.identityProvider);
|
|
228
|
+
// snsLoginClickGAEvent(item.identityProvider);
|
|
229
|
+
}}
|
|
239
230
|
// onClick={() => {snsLoginClickGAEvent(item.identityProvider); }}
|
|
240
231
|
className={' relative flex h-[72px] w-[540px] items-center ' +
|
|
241
232
|
' body_large2 justify-center rounded-[36px] ' +
|
|
@@ -88,16 +88,6 @@ const LoginContainer = ({
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
// GA 이벤트: 로그인 완료 (useLoginUuidSync.ts 훅에서 처리)
|
|
92
|
-
// const loginCompleteGAEvent = (userId: string) => {
|
|
93
|
-
// gtag.event({
|
|
94
|
-
// action: 'login_complete',
|
|
95
|
-
// category: 'login',
|
|
96
|
-
// label: `로그인 완료 - ${userId}`,
|
|
97
|
-
// value: '1'
|
|
98
|
-
// });
|
|
99
|
-
// };
|
|
100
|
-
|
|
101
91
|
useEffect(() => {
|
|
102
92
|
if (!isCheckRecentLogin) {
|
|
103
93
|
return;
|
|
@@ -140,9 +130,6 @@ const LoginContainer = ({
|
|
|
140
130
|
const normalized = redirect ? (redirect.startsWith('/') ? redirect : `/${redirect}`) : '/';
|
|
141
131
|
const finalUrl = appendUuidToRedirect(normalized, String(idx ?? ''));
|
|
142
132
|
|
|
143
|
-
// GA 이벤트
|
|
144
|
-
// loginCompleteGAEvent(String(idx ?? '')); useLoginUuidSync.ts 훅에서 처리
|
|
145
|
-
|
|
146
133
|
clearInterval(interval);
|
|
147
134
|
window.location.href = finalUrl;
|
|
148
135
|
return;
|
|
@@ -176,9 +163,6 @@ const LoginContainer = ({
|
|
|
176
163
|
const normalized = redirect ? (redirect.startsWith('/') ? redirect : `/${redirect}`) : '/';
|
|
177
164
|
const finalUrl = appendUuidToRedirect(normalized, String(idx ?? ''));
|
|
178
165
|
|
|
179
|
-
// GA 이벤트
|
|
180
|
-
// loginCompleteGAEvent(String(idx ?? '')); useLoginUuidSync.ts 훅에서 처리
|
|
181
|
-
|
|
182
166
|
window.location.href = finalUrl;
|
|
183
167
|
} else {
|
|
184
168
|
const loginUrl = `https://oauth.daeryunlaw.com/login/${type}?clientKey=${clientKey}&${
|
|
@@ -236,14 +220,14 @@ const LoginContainer = ({
|
|
|
236
220
|
}
|
|
237
221
|
];
|
|
238
222
|
|
|
239
|
-
const snsLoginClickGAEvent = (snsLoginProvider: 'kakao' | 'google' | 'naver' | 'apple') => {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
};
|
|
223
|
+
// const snsLoginClickGAEvent = (snsLoginProvider: 'kakao' | 'google' | 'naver' | 'apple') => {
|
|
224
|
+
// gtag.event({
|
|
225
|
+
// event_name: 'sns_login_click',
|
|
226
|
+
// login_category: `${snsLoginProvider}_sns_login`,
|
|
227
|
+
// event_label: `${snsLoginProvider} login button clicked`,
|
|
228
|
+
// sns_login_click_value: '1'
|
|
229
|
+
// });
|
|
230
|
+
// };
|
|
247
231
|
|
|
248
232
|
return (
|
|
249
233
|
<section className={layoutClassName}>
|
|
@@ -270,9 +254,11 @@ const LoginContainer = ({
|
|
|
270
254
|
' max-sm:label_medium2_tb max-sm:mt-[8px] '
|
|
271
255
|
}
|
|
272
256
|
>
|
|
273
|
-
<p>
|
|
274
|
-
|
|
275
|
-
|
|
257
|
+
<p>
|
|
258
|
+
SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
|
|
259
|
+
<br />
|
|
260
|
+
로그인하고 나의 사건 진행 상황을 확인하세요!
|
|
261
|
+
</p>
|
|
276
262
|
</div>
|
|
277
263
|
</div>
|
|
278
264
|
<div
|
|
@@ -288,7 +274,10 @@ const LoginContainer = ({
|
|
|
288
274
|
aria-label={`${item.identityProvider} 로그인 버튼`}
|
|
289
275
|
key={index}
|
|
290
276
|
type="button"
|
|
291
|
-
onClick={() => {
|
|
277
|
+
onClick={() => {
|
|
278
|
+
handleLoginClick(item.identityProvider);
|
|
279
|
+
// snsLoginClickGAEvent(item.identityProvider);
|
|
280
|
+
}}
|
|
292
281
|
// onClick={() => {snsLoginClickGAEvent(item.identityProvider); }}
|
|
293
282
|
className={
|
|
294
283
|
' relative flex h-[72px] w-[540px] items-center ' +
|
|
@@ -13,7 +13,6 @@ import Image from 'next/image';
|
|
|
13
13
|
import { useMutation } from '@tanstack/react-query';
|
|
14
14
|
import { getCookie, setCookie } from '../../../lib';
|
|
15
15
|
import ConfirmModal from './LoginComp/Modal/ConfirmModal';
|
|
16
|
-
import * as gtag from '../../../lib/gtag';
|
|
17
16
|
const Box = ({ code, code_name, selected, selectedList, setSelectedList, activeTooltipId, setActiveTooltipId, tooltipTimeoutRef }) => {
|
|
18
17
|
const [tooltipStyle, setTooltipStyle] = useState({});
|
|
19
18
|
const buttonRef = useRef(null);
|
|
@@ -173,15 +172,15 @@ const StepOne = () => {
|
|
|
173
172
|
{ code: 'CT0029', code_name: '디지털포렌식' },
|
|
174
173
|
{ code: 'CT0030', code_name: '경호' }
|
|
175
174
|
];
|
|
176
|
-
const signUpGAEvent = (userId) => {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
};
|
|
175
|
+
// const signUpGAEvent = (userId: string) => {
|
|
176
|
+
// gtag.event({
|
|
177
|
+
// event_name: 'sign_up_ga_event',
|
|
178
|
+
// category: 'sign_up',
|
|
179
|
+
// label: `회원가입 완료 - ${userId}`,
|
|
180
|
+
// value: '1',
|
|
181
|
+
// user_id: userId
|
|
182
|
+
// });
|
|
183
|
+
// };
|
|
185
184
|
const appendUuidToRedirect = (redirect, uuid) => {
|
|
186
185
|
if (!uuid)
|
|
187
186
|
return redirect;
|
|
@@ -241,7 +240,7 @@ const StepOne = () => {
|
|
|
241
240
|
user: userData
|
|
242
241
|
};
|
|
243
242
|
}),
|
|
244
|
-
onSuccess:
|
|
243
|
+
onSuccess: data => {
|
|
245
244
|
var _a, _b;
|
|
246
245
|
// console.log('data: ', data);
|
|
247
246
|
const userIdx = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.idx;
|
|
@@ -253,7 +252,7 @@ const StepOne = () => {
|
|
|
253
252
|
setIsModal(true);
|
|
254
253
|
sessionStorage.removeItem('login');
|
|
255
254
|
// ga trigger
|
|
256
|
-
signUpGAEvent(String(userIdx
|
|
255
|
+
// signUpGAEvent(String(userIdx ?? ''));
|
|
257
256
|
},
|
|
258
257
|
onError: error => {
|
|
259
258
|
console.error('Skip API 호출 실패:', error);
|