diff --git a/src/components/officeBooking/BookingTimeBar.js b/src/components/officeBooking/BookingTimeBar.js index 5c4b03f..9ee8a37 100644 --- a/src/components/officeBooking/BookingTimeBar.js +++ b/src/components/officeBooking/BookingTimeBar.js @@ -13,6 +13,7 @@ var endT = -1; export const BookingContentContainer = styled.div` margin-left: 40px; + padding-top: 40px; display: flex; ` diff --git a/src/pages/booking/officeBooking/OfficeBooking.js b/src/pages/booking/officeBooking/OfficeBooking.js index 1b64585..cc25023 100644 --- a/src/pages/booking/officeBooking/OfficeBooking.js +++ b/src/pages/booking/officeBooking/OfficeBooking.js @@ -93,11 +93,7 @@ function OfficeBooking(props) { .then((Response) => { setBookingState(Response.data.data.bookedTimes) }) - .catch((Error) => { - console.log(Error) - window.alert("정보를 불러올 수 없습니댜.") - window.history.back() - }); + .catch((Error)=>{ basicError(Error) }); }; const getOfficeInfoForBooking = (id) => { @@ -106,11 +102,7 @@ function OfficeBooking(props) { console.log(Response.data.data) setOfficeInfo(Response.data.data) }) - .catch((Error) => { - console.log(Error) - window.alert("정보를 불러올 수 없습니댜.") - window.history.back() - }); + .catch((Error)=>{ basicError(Error) }); }; useEffect(() => { @@ -208,7 +200,7 @@ function requestBooking(bookingPurpose, startT, endT) { if (response.data.status === '200') { alert('예약에 성공하였습니다!') } else { alert(response.data.message); } }) - .catch(function (error) { console.log(error) }); + .catch((Error)=>{ basicError(Error) }); } } export { requestBooking }; \ No newline at end of file diff --git a/src/pages/booking/officeBooking/OfficeBookingCheck.js b/src/pages/booking/officeBooking/OfficeBookingCheck.js index e2e614b..6af1a31 100644 --- a/src/pages/booking/officeBooking/OfficeBookingCheck.js +++ b/src/pages/booking/officeBooking/OfficeBookingCheck.js @@ -51,11 +51,7 @@ function OfficeBookingCheck(props) { getOfficeInfo(officeId) setBookingTime(Response.data.data.startTime, Response.data.data.endTime) }) - .catch((Error) => { - console.log('Error -> ', Error) - window.alert("예약 정보를 불러올 수 없습니댜.") - window.history.back() - }); + .catch((Error)=>{ basicError(Error) }); }; const getOfficeInfo = (id) => { @@ -64,11 +60,7 @@ function OfficeBookingCheck(props) { console.log(Response.data.data) setOfficeInfo(Response.data.data) }) - .catch((Error) => { - console.log(Error) - window.alert("정보를 불러올 수 없습니댜.") - window.history.back() - }); + .catch((Error)=>{ basicError(Error) }); }; useEffect(() => { diff --git a/src/pages/booking/resourceBooking/ResourceBookingCheck.js b/src/pages/booking/resourceBooking/ResourceBookingCheck.js index 4ff6f72..68ec71d 100644 --- a/src/pages/booking/resourceBooking/ResourceBookingCheck.js +++ b/src/pages/booking/resourceBooking/ResourceBookingCheck.js @@ -12,6 +12,7 @@ import { findStatus } from 'constants/BookingStatus'; import { RightContainer, WhiteContainer } from 'components/rightContainer/RightContainer'; import { TitleText, BookingDateText, PurposeTextarea } from './ResourceBooking'; import { getToken } from 'utils/IsLoginUtil'; +import { basicError } from 'utils/ErrorHandlerUtil'; const MyStatusContainer = styled(StatusContainer)` margin-top: 12px; @@ -38,11 +39,7 @@ function ResourceBookingCheck(props) { const getResourceInfo = () => { ResourcesAxios.get(`/${resourceId}`) .then((Response)=>{ setResourceInfo(Response.data.data) }) - .catch((Error)=>{ - console.log(Error) - window.alert("자원 정보를 불러올 수 없습니댜.") - window.history.back() - }); + .catch((Error)=>{ basicError(Error) }); }; const getBookingInfo = () => { (props.isAdmin @@ -58,11 +55,7 @@ function ResourceBookingCheck(props) { resourceId = Response.data.data.resourceId getResourceInfo(resourceId) }) - .catch((Error)=>{ - console.log('Error -> ', Error) - window.alert("자원 예약 정보를 불러올 수 없습니댜.") - window.history.back() - }); + .catch((Error)=>{ basicError(Error) }); }; useEffect(() => {