diff --git a/.env.example b/.env.example index 813fd3d..d8217e1 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,3 @@ VITE_PUBLIC_PORT=3000 NODE_ENV=development -VITE_PUBLIC_DOMAIN=localhost -API_URL= \ No newline at end of file +VITE_PUBLIC_DOMAIN=localhost \ No newline at end of file diff --git a/src/components/TimeForm.jsx b/src/components/TimeForm.jsx index 6b3c9af..00d5403 100644 --- a/src/components/TimeForm.jsx +++ b/src/components/TimeForm.jsx @@ -40,7 +40,6 @@ const ProductAndTime = ({ const navigate = useNavigate(); - // TODO: Where do we need that? Seems unnecessary. for (let i = 1; i < 4; i++) { const randomDate = new Date(currentYear, currentMonth, currentDay + i); futureDates.push(randomDate); diff --git a/src/css/StationList.module.css b/src/css/StationList.module.css index 3cd3307..e325797 100644 --- a/src/css/StationList.module.css +++ b/src/css/StationList.module.css @@ -42,6 +42,7 @@ justify-content: flex-end; flex-direction: row; margin-right: 1rem; + margin-top: 0.4rem; } .allCheckbox { diff --git a/src/pages/RentInfo.jsx b/src/pages/RentInfo.jsx index 5ebbabd..0463c59 100644 --- a/src/pages/RentInfo.jsx +++ b/src/pages/RentInfo.jsx @@ -87,7 +87,7 @@ const RentInfoPage = ({ handleItemReturned }) => { try { setLoading(true); const { data } = await getRentById(id); - console.log('data', data); + if (data.isItemReturned === true) { navigate('/', { replace: true }); return; diff --git a/src/theme.css b/src/theme.css index d23f8e6..30c3450 100644 --- a/src/theme.css +++ b/src/theme.css @@ -66,3 +66,21 @@ .show > .btn-outline-primary.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(0, 135, 130, 0.5); } + +/* Checkbox */ +.form-check-input { + width: 19px; + height: 19px; + margin: 0px; + border: none; +} +.form-check-input:checked { + border-color: #008782; + background-color: #008782; +} +.form-check-input:focus { + box-shadow: 0 0 0 0.2rem rgba(0, 135, 130, 0.5); +} +.form-check-input:not(:checked) { + border: 2px solid rgb(182, 182, 182); +} diff --git a/src/utils/axios.js b/src/utils/axios.js index 0150818..eb25be9 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -1,9 +1,9 @@ import axios from 'axios'; -import { API_URL, NODE_ENV, PUBLIC_DOMAIN, PUBLIC_PORT } from './constants'; +import { NODE_ENV, PUBLIC_DOMAIN, PUBLIC_PORT } from './constants'; const baseURL = NODE_ENV === 'production' - ? API_URL + ? 'https://hsytrailerapi.azurewebsites.net/api/' : `http://${PUBLIC_DOMAIN ?? 'localhost'}:${PUBLIC_PORT ?? '3000'}/api/`; const axiosInstance = axios.create({ diff --git a/src/utils/constants.js b/src/utils/constants.js index a7de172..640fb16 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -1,6 +1,5 @@ -const API_URL = import.meta.env.VITE_API_URL; const NODE_ENV = import.meta.env.NODE_ENV; const PUBLIC_DOMAIN = import.meta.env.VITE_PUBLIC_DOMAIN; const PUBLIC_PORT = import.meta.env.VITE_PUBLIC_PORT; -export { API_URL, NODE_ENV, PUBLIC_DOMAIN, PUBLIC_PORT }; +export { NODE_ENV, PUBLIC_DOMAIN, PUBLIC_PORT };