Skip to content

Commit fd7e192

Browse files
authored
feat: 지원서 중복 제출 막기 (#129)
1 parent 0776c74 commit fd7e192

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app/application/apply/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const ApplyPage = () => {
2929
const [curGpaScore, setCurGpaScore] = useState<number | null>(null);
3030
const [curUniversityList, setCurUniversityList] = useState<number[]>([]);
3131

32+
const [isSubmitting, setIsSubmitting] = useState<boolean>(false);
33+
3234
useEffect(() => {
3335
const fetchAll = async () => {
3436
try {
@@ -97,6 +99,7 @@ const ApplyPage = () => {
9799
return;
98100
}
99101

102+
setIsSubmitting(true); // TODO: 현재 임시 submit 처리, 이후에 통합 처리 추가
100103
try {
101104
await postApplicationApi({
102105
gpaScoreId: curGpaScore,
@@ -110,6 +113,8 @@ const ApplyPage = () => {
110113
setStep(99);
111114
} catch (err) {
112115
alert(err.response.data.message);
116+
} finally {
117+
setIsSubmitting(false);
113118
}
114119
};
115120

0 commit comments

Comments
 (0)