@daeryun/dr_components 1.3.8 → 1.3.10
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/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.ts +1 -1
- package/dist/components/page/Login/LoginComp/LoginContainer.jsx +9 -19
- package/dist/components/page/Login/LoginComp/LoginContainer.tsx +10 -22
- package/dist/components/page/Login/StepOne.jsx +1 -1
- package/dist/components/page/Login/StepOne.tsx +9 -9
- package/dist/components/page/Login/StepTwo.jsx +1 -1
- package/dist/components/page/Login/StepTwo.tsx +8 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -81,15 +81,6 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
81
81
|
return redirect;
|
|
82
82
|
}
|
|
83
83
|
};
|
|
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
84
|
useEffect(() => {
|
|
94
85
|
if (!isCheckRecentLogin) {
|
|
95
86
|
return;
|
|
@@ -128,8 +119,6 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
128
119
|
const redirect = searchParam.get('redirect');
|
|
129
120
|
const normalized = redirect ? (redirect.startsWith('/') ? redirect : `/${redirect}`) : '/';
|
|
130
121
|
const finalUrl = appendUuidToRedirect(normalized, String(idx !== null && idx !== void 0 ? idx : ''));
|
|
131
|
-
// GA 이벤트
|
|
132
|
-
// loginCompleteGAEvent(String(idx ?? '')); useLoginUuidSync.ts 훅에서 처리
|
|
133
122
|
clearInterval(interval);
|
|
134
123
|
window.location.href = finalUrl;
|
|
135
124
|
return;
|
|
@@ -158,8 +147,6 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
158
147
|
const redirect = searchParam.get('redirect');
|
|
159
148
|
const normalized = redirect ? (redirect.startsWith('/') ? redirect : `/${redirect}`) : '/';
|
|
160
149
|
const finalUrl = appendUuidToRedirect(normalized, String(idx !== null && idx !== void 0 ? idx : ''));
|
|
161
|
-
// GA 이벤트
|
|
162
|
-
// loginCompleteGAEvent(String(idx ?? '')); useLoginUuidSync.ts 훅에서 처리
|
|
163
150
|
window.location.href = finalUrl;
|
|
164
151
|
}
|
|
165
152
|
else {
|
|
@@ -226,18 +213,21 @@ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px]
|
|
|
226
213
|
<div className={' body_large2 mt-[12px] text-[#000000] ' +
|
|
227
214
|
' max-lg:title_small_tb max-lg:mt-[12px] ' +
|
|
228
215
|
' max-sm:label_medium2_tb max-sm:mt-[8px] '}>
|
|
229
|
-
<p>
|
|
230
|
-
|
|
231
|
-
|
|
216
|
+
<p>
|
|
217
|
+
SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
|
|
218
|
+
<br />
|
|
219
|
+
로그인하고 나의 사건 진행 상황을 확인하세요!
|
|
220
|
+
</p>
|
|
232
221
|
</div>
|
|
233
222
|
</div>
|
|
234
223
|
<div className={' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
|
|
235
224
|
' max-lg:mt-[168px] ' +
|
|
236
225
|
' max-sm:mt-[80px] '}>
|
|
237
226
|
{loginProvider.map((item, index) => {
|
|
238
|
-
return (<button aria-label={`${item.identityProvider} 로그인 버튼`} key={index} type="button" onClick={() => {
|
|
239
|
-
|
|
240
|
-
|
|
227
|
+
return (<button aria-label={`${item.identityProvider} 로그인 버튼`} key={index} type="button" onClick={() => {
|
|
228
|
+
handleLoginClick(item.identityProvider);
|
|
229
|
+
snsLoginClickGAEvent(item.identityProvider);
|
|
230
|
+
}} className={' relative flex h-[72px] w-[540px] items-center ' +
|
|
241
231
|
' body_large2 justify-center rounded-[36px] ' +
|
|
242
232
|
' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
|
|
243
233
|
' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
|
|
@@ -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}&${
|
|
@@ -239,7 +223,7 @@ const LoginContainer = ({
|
|
|
239
223
|
const snsLoginClickGAEvent = (snsLoginProvider: 'kakao' | 'google' | 'naver' | 'apple') => {
|
|
240
224
|
gtag.event({
|
|
241
225
|
event_name: 'sns_login_click',
|
|
242
|
-
login_category: `${snsLoginProvider}_sns_login`,
|
|
226
|
+
login_category: `${snsLoginProvider}_sns_login`,
|
|
243
227
|
event_label: `${snsLoginProvider} login button clicked`,
|
|
244
228
|
sns_login_click_value: '1'
|
|
245
229
|
});
|
|
@@ -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,8 +274,10 @@ const LoginContainer = ({
|
|
|
288
274
|
aria-label={`${item.identityProvider} 로그인 버튼`}
|
|
289
275
|
key={index}
|
|
290
276
|
type="button"
|
|
291
|
-
onClick={() => {
|
|
292
|
-
|
|
277
|
+
onClick={() => {
|
|
278
|
+
handleLoginClick(item.identityProvider);
|
|
279
|
+
snsLoginClickGAEvent(item.identityProvider);
|
|
280
|
+
}}
|
|
293
281
|
className={
|
|
294
282
|
' relative flex h-[72px] w-[540px] items-center ' +
|
|
295
283
|
' body_large2 justify-center rounded-[36px] ' +
|
|
@@ -241,7 +241,7 @@ const StepOne = () => {
|
|
|
241
241
|
user: userData
|
|
242
242
|
};
|
|
243
243
|
}),
|
|
244
|
-
onSuccess:
|
|
244
|
+
onSuccess: data => {
|
|
245
245
|
var _a, _b;
|
|
246
246
|
// console.log('data: ', data);
|
|
247
247
|
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;
|
|
@@ -238,7 +238,7 @@ const StepOne = () => {
|
|
|
238
238
|
const signUpGAEvent = (userId: string) => {
|
|
239
239
|
gtag.event({
|
|
240
240
|
event_name: 'sign_up_ga_event',
|
|
241
|
-
category: 'sign_up',
|
|
241
|
+
category: 'sign_up',
|
|
242
242
|
label: `회원가입 완료 - ${userId}`,
|
|
243
243
|
value: '1',
|
|
244
244
|
user_id: userId
|
|
@@ -252,10 +252,10 @@ const StepOne = () => {
|
|
|
252
252
|
if (url.origin !== window.location.origin) return redirect; // 외부 도메인 차단
|
|
253
253
|
url.searchParams.set('uuid', uuid);
|
|
254
254
|
return url.pathname + url.search;
|
|
255
|
-
|
|
255
|
+
} catch {
|
|
256
256
|
return redirect;
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
259
|
|
|
260
260
|
const modalHandleClose = () => {
|
|
261
261
|
setIsModal(false);
|
|
@@ -292,7 +292,7 @@ const StepOne = () => {
|
|
|
292
292
|
})
|
|
293
293
|
});
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
// PATCH 성공 후 GET으로 상세 정보 조회
|
|
296
296
|
const userGetResponse = await fetch(`/api/lawfirm/app/user`, {
|
|
297
297
|
method: 'GET',
|
|
298
298
|
headers: { 'Content-Type': 'application/json' },
|
|
@@ -303,21 +303,21 @@ const StepOne = () => {
|
|
|
303
303
|
throw new Error('사용자 정보 API 호출 실패');
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
const userData = await userGetResponse.json()
|
|
306
|
+
const userData = await userGetResponse.json();
|
|
307
307
|
|
|
308
308
|
return {
|
|
309
309
|
marketing: await marketingResponse.json(),
|
|
310
310
|
user: userData
|
|
311
311
|
};
|
|
312
312
|
},
|
|
313
|
-
onSuccess:
|
|
313
|
+
onSuccess: data => {
|
|
314
314
|
// console.log('data: ', data);
|
|
315
315
|
const userIdx = data?.user?.data?.idx;
|
|
316
|
-
|
|
316
|
+
|
|
317
317
|
const redirect = decodeURIComponent(getCookie('redirect')) || '/';
|
|
318
318
|
const newRedirect = appendUuidToRedirect(redirect, String(userIdx ?? ''));
|
|
319
319
|
// console.log('newRedirect:', newRedirect);
|
|
320
|
-
|
|
320
|
+
|
|
321
321
|
setCookie({ key: 'redirect', value: newRedirect });
|
|
322
322
|
setModalObj({ title: '회원가입이 완료되었습니다.', subTitle: '' });
|
|
323
323
|
setIsModal(true);
|
|
@@ -280,7 +280,7 @@ const StepTwo = () => {
|
|
|
280
280
|
user: userData
|
|
281
281
|
};
|
|
282
282
|
}),
|
|
283
|
-
onSuccess:
|
|
283
|
+
onSuccess: data => {
|
|
284
284
|
var _a, _b;
|
|
285
285
|
// console.log('data: ', data);
|
|
286
286
|
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;
|
|
@@ -249,12 +249,12 @@ const StepTwo = () => {
|
|
|
249
249
|
const signUpGAEvent = (userId: string) => {
|
|
250
250
|
gtag.event({
|
|
251
251
|
event_name: 'sign_up_ga_event',
|
|
252
|
-
category: 'sign_up',
|
|
252
|
+
category: 'sign_up',
|
|
253
253
|
label: `회원가입 완료 - ${userId}`,
|
|
254
254
|
value: '1',
|
|
255
255
|
user_id: userId
|
|
256
256
|
});
|
|
257
|
-
};
|
|
257
|
+
};
|
|
258
258
|
|
|
259
259
|
// API 호출 함수
|
|
260
260
|
const fetchFieldData = async (centerCode: string) => {
|
|
@@ -288,10 +288,10 @@ const StepTwo = () => {
|
|
|
288
288
|
if (url.origin !== window.location.origin) return redirect; // 외부 도메인 차단
|
|
289
289
|
url.searchParams.set('uuid', uuid);
|
|
290
290
|
return url.pathname + url.search;
|
|
291
|
-
|
|
291
|
+
} catch {
|
|
292
292
|
return redirect;
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
295
|
|
|
296
296
|
const doneMutation = useMutation({
|
|
297
297
|
mutationFn: async (bodyData: {
|
|
@@ -350,14 +350,14 @@ const StepTwo = () => {
|
|
|
350
350
|
user: userData
|
|
351
351
|
};
|
|
352
352
|
},
|
|
353
|
-
onSuccess:
|
|
353
|
+
onSuccess: data => {
|
|
354
354
|
// console.log('data: ', data);
|
|
355
355
|
const userIdx = data?.user?.data?.idx;
|
|
356
|
-
|
|
356
|
+
|
|
357
357
|
const redirect = decodeURIComponent(getCookie('redirect')) || '/';
|
|
358
358
|
const newRedirect = appendUuidToRedirect(redirect, String(userIdx ?? ''));
|
|
359
359
|
// console.log('newRedirect:', newRedirect);
|
|
360
|
-
|
|
360
|
+
|
|
361
361
|
setCookie({ key: 'redirect', value: newRedirect });
|
|
362
362
|
setModalObj({ title: '회원가입이 완료되었습니다.', subTitle: '' });
|
|
363
363
|
setIsModal(true);
|
|
@@ -367,7 +367,6 @@ const StepTwo = () => {
|
|
|
367
367
|
// ga trigger
|
|
368
368
|
signUpGAEvent(String(userIdx ?? ''));
|
|
369
369
|
},
|
|
370
|
-
|
|
371
370
|
|
|
372
371
|
onError: error => {
|
|
373
372
|
console.error('Skip API 호출 실패:', error);
|