Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheppner committed Aug 27, 2024
2 parents 73a4a20 + c592979 commit 7509aba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Binary file added public/img/default.webp
Binary file not shown.
16 changes: 2 additions & 14 deletions src/components/RangeCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useEffect, useState } from "react";
import { checkIfImageExists } from "../utils/globals";
import SouthEastIcon from "@mui/icons-material/SouthEast";

const DEFAULT_IMAGE = `${window.location.origin}/app_static/img/default.jpg`;
// const DEFAULT_IMAGE = `${window.location.origin}/app_static/img/default.jpg`;
const DEFAULT_IMAGE = `${window.location.origin}/public/range-image/default.webp`

export default function RangeCard({ range, onSelectTour }) {
const [image, setImage] = useState(DEFAULT_IMAGE);
Expand All @@ -27,18 +28,6 @@ export default function RangeCard({ range, onSelectTour }) {
}
}, [range]);

const getStates = () => {
if (!!range && !!range.states && range.states.length > 0) {
if (range.states.length > 2) {
return `${range.states[0]}, ${range.states[1]}, ...`;
} else if (range.states.length == 2) {
return `${range.states[0]}, ${range.states[1]}`;
} else {
return `${range.states[0]}`;
}
}
return "";
};

return (
<Paper
Expand Down Expand Up @@ -88,7 +77,6 @@ export default function RangeCard({ range, onSelectTour }) {
>
{range.range}
</Typography>
{/* <Typography sx={{textAlign: 'left'}} color={'#FFFFFF'}>{getStates()}</Typography> */}
</Box>
</Paper>
);
Expand Down

0 comments on commit 7509aba

Please sign in to comment.