Skip to content

Commit 3b9932b

Browse files
committed
feat: 폼 작성 취소버튼에 모달 연동
1 parent 7026298 commit 3b9932b

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/app/(pages)/(albaform)/apply/[formId]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ export default function Apply() {
220220
errormessage={errors.password?.message}
221221
/>
222222
</div>
223-
<div className="lg:flex-2 mt-4 flex flex-col gap-[10px] lg:mt-8 lg:flex-row">
223+
<div className="lg:flex-2 mt-4 flex w-full flex-col gap-[10px] lg:mt-8 lg:flex-row">
224224
<Button
225225
type="button"
226226
variant="outlined"
227227
width="md"
228228
color="orange"
229-
className="h-[58px] border lg:h-[72px] lg:text-xl lg:leading-8"
229+
className="h-[58px] w-full border lg:h-[72px] lg:text-xl lg:leading-8"
230230
onClick={onTempSave}
231231
disabled={!isDirty}
232232
>
@@ -237,7 +237,7 @@ export default function Apply() {
237237
variant="solid"
238238
width="md"
239239
color="orange"
240-
className="h-[58px] lg:h-[72px] lg:text-xl lg:leading-8"
240+
className="h-[58px] w-full lg:h-[72px] lg:text-xl lg:leading-8"
241241
disabled={!isValid || !isDirty}
242242
>
243243
작성 완료

src/app/(pages)/(albaform)/layout.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,25 @@ export default function Layout({ children }: { children: ReactNode }) {
2626
isOpen: true,
2727
title: "폼 작성 취소",
2828
content: "작성을 취소하시겠습니까?",
29-
onCancel: () => {},
30-
onConfirm: () => router.back(),
29+
onConfirm: () => {
30+
openModal("customForm", {
31+
isOpen: false,
32+
title: "",
33+
content: "",
34+
onConfirm: () => {},
35+
onCancel: () => {},
36+
});
37+
router.back();
38+
},
39+
onCancel: () => {
40+
openModal("customForm", {
41+
isOpen: false,
42+
title: "",
43+
content: "",
44+
onConfirm: () => {},
45+
onCancel: () => {},
46+
});
47+
},
3148
})
3249
}
3350
/>

0 commit comments

Comments
 (0)