Skip to content

Commit

Permalink
fix: 가능시간 POST시 endTime이 30분 적게 들어가는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Jun 23, 2024
1 parent 49e1651 commit af422e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
26 changes: 14 additions & 12 deletions src/pages/legacy/selectSchedule/SelectModal.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { userNameAtom } from 'atoms/atom';
import { isAxiosError } from 'axios';
import Text from 'components/atomComponents/Text';
import { ExitIc } from 'components/Icon/icon';
import { useTimetableContext } from 'components/timetableComponents/context';
import { formatHostScheduleScheme, formatMemberScheduleScheme } from 'pages/selectSchedule/utils';
import { hostAvailableApi, userAvailableApi } from 'utils/apis/legacy/createHostAvailableSchedule';
import { useNavigate, useParams } from 'react-router';

import { ExitIc } from 'components/Icon/icon';
import Text from 'components/atomComponents/Text';
import { isAxiosError } from 'axios';
import { useRecoilValue } from 'recoil';
import styled from 'styled-components/macro';
import { theme } from 'styles/theme';
import { useRecoilValue } from 'recoil';
import { useTimetableContext } from 'components/timetableComponents/context';
import { userNameAtom } from 'atoms/atom';
import { hostAvailableApi, userAvailableApi } from 'utils/apis/legacy/createHostAvailableSchedule';

interface ModalProps {
setShowModal: (isModalOpen: boolean) => void;
Expand Down Expand Up @@ -162,12 +161,15 @@ const MentContainer = styled.div`
`;

const ModalMent = styled.span`
color: ${({ theme }) => theme.colors.white};
${({ theme }) => theme.fonts.body2};
margin-top: 2.4rem;
margin-bottom: 0.8rem;
width: 14.4rem;
text-align: center;
margin-bottom: 0.8rem;
margin-top: 2.4rem;
color: ${({ theme }) => theme.colors.white};
${({ theme }) => theme.fonts.body2};
`;

const ModalHighlight = styled.span`
Expand Down
5 changes: 3 additions & 2 deletions src/pages/selectSchedule/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SelectedSlotType } from 'components/timetableComponents/context';
import { addMinutes } from 'components/timetableComponents/utils';

export const DURATION = {
HALF: '30분',
Expand Down Expand Up @@ -49,7 +50,7 @@ export const formatHostScheduleScheme = (selectedSlots: SelectedSlotType) => {
day: day.padStart(2, '0'),
dayOfWeek: dayOfWeek,
startTime: slot.startSlot,
endTime: slot.endSlot,
endTime: addMinutes(slot.endSlot, 30),
priority: slot.priority,
};
});
Expand All @@ -71,7 +72,7 @@ export const formatMemberScheduleScheme = (selectedSlots: SelectedSlotType, user
day: day.padStart(2, '0'),
dayOfWeek: dayOfWeek,
startTime: slot.startSlot,
endTime: slot.endSlot,
endTime: addMinutes(slot.endSlot, 30),
priority: slot.priority,
};
});
Expand Down

0 comments on commit af422e5

Please sign in to comment.