Skip to content

Commit e32de61

Browse files
authored
Merge pull request #530 from woowacourse-teams/develop
[release] v0.1.2
2 parents 36feb10 + 6610e12 commit e32de61

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

frontend/src/components/ScheduleAddModal/ScheduleAddModal.tsx

+11-9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { userState } from '@/recoil/atoms';
1616

1717
import Button from '@/components/@common/Button/Button';
1818
import Fieldset from '@/components/@common/Fieldset/Fieldset';
19+
import Spinner from '@/components/@common/Spinner/Spinner';
1920

2021
import { CACHE_KEY } from '@/constants/api';
2122
import { DATE_TIME } from '@/constants/date';
@@ -54,17 +55,16 @@ function ScheduleAddModal({ dateInfo, closeModal }: ScheduleAddModalProps) {
5455

5556
const queryClient = useQueryClient();
5657

57-
const { data } = useQuery<AxiosResponse<CategoryType[]>, AxiosError>(
58-
CACHE_KEY.MY_CATEGORIES,
59-
() => categoryApi.getMy(accessToken),
60-
{
61-
onSuccess: (data) => onSuccessGetCategories(data),
62-
}
63-
);
58+
const { isLoading: isGetCategoryLoading, data } = useQuery<
59+
AxiosResponse<CategoryType[]>,
60+
AxiosError
61+
>(CACHE_KEY.MY_CATEGORIES, () => categoryApi.getMy(accessToken), {
62+
onSuccess: (data) => onSuccessGetCategories(data),
63+
});
6464

6565
const categoryId = useControlledInput();
6666

67-
const { isLoading, mutate: postSchedule } = useMutation<
67+
const { mutate: postSchedule } = useMutation<
6868
AxiosResponse<{ schedules: ScheduleType[] }>,
6969
AxiosError,
7070
Omit<ScheduleType, 'id' | 'categoryId' | 'colorCode' | 'categoryType'>,
@@ -129,7 +129,9 @@ function ScheduleAddModal({ dateInfo, closeModal }: ScheduleAddModalProps) {
129129
closeModal();
130130
};
131131

132-
if (isLoading) return <>Loading</>;
132+
if (isGetCategoryLoading || data === undefined) {
133+
return <Spinner size={10} />;
134+
}
133135

134136
return (
135137
<div css={scheduleAddModal}>

frontend/src/pages/CalendarPage/CalendarPage.styles.ts

+4
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ const itemWithBackgroundStyle = (
173173
174174
cursor: pointer;
175175
filter: ${isHovering && 'brightness(0.95)'};
176+
177+
transition: background-color 0.3s;
176178
`;
177179

178180
const itemWithoutBackgroundStyle = (
@@ -195,6 +197,8 @@ const itemWithoutBackgroundStyle = (
195197
196198
cursor: pointer;
197199
filter: none;
200+
201+
transition: background-color 0.3s;
198202
`;
199203

200204
const moreStyle = ({ colors }: Theme) => css`

0 commit comments

Comments
 (0)