@daeryun/dr_components 0.9.25 → 0.9.26

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.
@@ -172,6 +172,12 @@ const StepOne = () => {
172
172
  { code: 'CT0029', code_name: '디지털포렌식' },
173
173
  { code: 'CT0030', code_name: '경호' }
174
174
  ];
175
+ const modalHandleClose = () => {
176
+ setIsModal(false);
177
+ setModalObj({ title: '', subTitle: '' });
178
+ const redirect = decodeURIComponent(getCookie('redirect')) || '/';
179
+ window.location.href = redirect;
180
+ };
175
181
  const skipMutation = useMutation({
176
182
  mutationFn: (bodyData) => __awaiter(void 0, void 0, void 0, function* () {
177
183
  const response = yield fetch(`/api/lawfirm/app/user`, {
@@ -187,19 +193,15 @@ const StepOne = () => {
187
193
  return response.json();
188
194
  }),
189
195
  onSuccess: () => {
190
- const redirect = decodeURIComponent(getCookie('redirect')) || '/';
191
- window.location.href = redirect;
196
+ setModalObj({ title: '회원가입이 완료되었습니다.', subTitle: '' });
197
+ setIsModal(true);
198
+ sessionStorage.removeItem('login');
192
199
  },
193
200
  onError: error => {
194
201
  console.error('Skip API 호출 실패:', error);
195
202
  // 필요시 에러 처리 로직 추가
196
203
  }
197
204
  });
198
- const modalHandleClose = () => {
199
- setIsModal(false);
200
- setModalObj({ title: '', subTitle: '' });
201
- window.location.href = '/login/sign/step_two';
202
- };
203
205
  // 다음 버튼 클릭 시 세션 스토리지에 category 값 저장
204
206
  const handleNext = () => __awaiter(void 0, void 0, void 0, function* () {
205
207
  const existingLogin = sessionStorage.getItem('login');
@@ -214,9 +216,7 @@ const StepOne = () => {
214
216
  }
215
217
  const updatedLoginData = Object.assign(Object.assign({}, loginData), { selectedCategories: selectedList });
216
218
  sessionStorage.setItem('login', JSON.stringify(updatedLoginData));
217
- setModalObj({ title: '회원가입이 완료되었습니다.', subTitle: '' });
218
- setIsModal(true);
219
- sessionStorage.removeItem('login');
219
+ window.location.href = '/login/sign/step_two';
220
220
  });
221
221
  const handleSkip = () => __awaiter(void 0, void 0, void 0, function* () {
222
222
  try {
@@ -234,6 +234,14 @@ const StepOne = () => {
234
234
  { code: 'CT0030', code_name: '경호' }
235
235
  ];
236
236
 
237
+ const modalHandleClose = () => {
238
+ setIsModal(false);
239
+ setModalObj({ title: '', subTitle: '' });
240
+
241
+ const redirect = decodeURIComponent(getCookie('redirect')) || '/';
242
+ window.location.href = redirect;
243
+ };
244
+
237
245
  const skipMutation = useMutation({
238
246
  mutationFn: async (bodyData: { name: string; phoneNumber: string; uuid: string }) => {
239
247
  const response = await fetch(`/api/lawfirm/app/user`, {
@@ -251,8 +259,10 @@ const StepOne = () => {
251
259
  return response.json();
252
260
  },
253
261
  onSuccess: () => {
254
- const redirect = decodeURIComponent(getCookie('redirect')) || '/';
255
- window.location.href = redirect;
262
+ setModalObj({ title: '회원가입이 완료되었습니다.', subTitle: '' });
263
+ setIsModal(true);
264
+
265
+ sessionStorage.removeItem('login');
256
266
  },
257
267
  onError: error => {
258
268
  console.error('Skip API 호출 실패:', error);
@@ -260,12 +270,6 @@ const StepOne = () => {
260
270
  }
261
271
  });
262
272
 
263
- const modalHandleClose = () => {
264
- setIsModal(false);
265
- setModalObj({ title: '', subTitle: '' });
266
- window.location.href = '/login/sign/step_two';
267
- };
268
-
269
273
  // 다음 버튼 클릭 시 세션 스토리지에 category 값 저장
270
274
  const handleNext = async () => {
271
275
  const existingLogin = sessionStorage.getItem('login');
@@ -286,10 +290,7 @@ const StepOne = () => {
286
290
 
287
291
  sessionStorage.setItem('login', JSON.stringify(updatedLoginData));
288
292
 
289
- setModalObj({ title: '회원가입이 완료되었습니다.', subTitle: '' });
290
- setIsModal(true);
291
-
292
- sessionStorage.removeItem('login');
293
+ window.location.href = '/login/sign/step_two';
293
294
  };
294
295
 
295
296
  const handleSkip = async () => {