Skip to content

Commit

Permalink
Merge pull request #75 from Lor3wp/stations-list-ui-improvements
Browse files Browse the repository at this point in the history
stations list UI improvements
  • Loading branch information
ramizwd authored Dec 4, 2023
2 parents 7b31cc3 + 1af055e commit d8b657f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
VITE_PUBLIC_PORT=3000
NODE_ENV=development
VITE_PUBLIC_DOMAIN=localhost
API_URL=
VITE_PUBLIC_DOMAIN=localhost
1 change: 0 additions & 1 deletion src/components/TimeForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/css/StationList.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
justify-content: flex-end;
flex-direction: row;
margin-right: 1rem;
margin-top: 0.4rem;
}

.allCheckbox {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RentInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions src/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 2 additions & 2 deletions src/utils/axios.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
3 changes: 1 addition & 2 deletions src/utils/constants.js
Original file line number Diff line number Diff line change
@@ -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 };

0 comments on commit d8b657f

Please sign in to comment.