Skip to content

Commit de2fd58

Browse files
committed
Merge branch 'develop'
2 parents ef08e02 + ac42473 commit de2fd58

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/components/modal/index.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const Modal = ({
7070
} as const;
7171

7272
SelectSelfList.forEach((val) => {
73-
const setter = setters[val.floor as 2, 3, 4];
73+
const setter = setters[val.floor as (2 | 3 | 4)];
7474
if (setter) {
7575
setter({ floor: val.floor, teacher: val.teacher });
7676
}
@@ -117,6 +117,10 @@ export const Modal = ({
117117
});
118118
} catch (error) {
119119
setState(false);
120+
showToast({
121+
type: 'error',
122+
message: '자습감독 등록에 실패했습니다',
123+
});
120124
console.error(error);
121125
}
122126
}
@@ -134,6 +138,10 @@ export const Modal = ({
134138
refetchStatus();
135139
},
136140
onError: (error) => {
141+
showToast({
142+
type: 'error',
143+
message: '학사일정 추가에 실패했습니다',
144+
});
137145
console.log(error);
138146
},
139147
});
@@ -218,11 +226,11 @@ export const Modal = ({
218226
</S.ScheduleTitle>
219227
<S.FixContent>
220228
{Schedule?.map((item) => (
221-
<S.ScheduleItem>
229+
<S.ScheduleItem key={item.id}>
222230
<S.ScheduleItemText>{item.event_name}</S.ScheduleItemText>
223231
<img
224232
src={closeIcon}
225-
alt=""
233+
alt="일정 삭제"
226234
width={20}
227235
height={20}
228236
onClick={() => onClickDelete(item.id)}

0 commit comments

Comments
 (0)