diff --git a/src/components/Carousel.jsx b/src/components/Carousel.jsx index 5c7ede2..ba60deb 100644 --- a/src/components/Carousel.jsx +++ b/src/components/Carousel.jsx @@ -13,10 +13,6 @@ const Carousel = () => { const logement = Dataloges.find((element) => element.id == id); - useEffect(() => { - setSrc(0); - }, [id]); - const previousClick = () => { setSrc((prevIndex) => prevIndex === 0 ? logement.pictures.length - 1 : prevIndex - 1 diff --git a/src/pages/Location.jsx b/src/pages/Location.jsx index efa4e79..fa82dd0 100644 --- a/src/pages/Location.jsx +++ b/src/pages/Location.jsx @@ -1,5 +1,4 @@ -import React, { useEffect } from "react"; -import { useNavigate } from "react-router-dom"; +// import React, { useEffect } from "react"; import Navigation from "../components/Navigation"; import '../sass/location.scss' @@ -8,9 +7,7 @@ import Carousel from "../components/Carousel"; import Rating from "../components/Rating"; import Footer from "../components/Footer"; import Error from "./Error"; - -//import Error from "./Error"; -import { Routes, Route, useParams } from 'react-router-dom'; +import { useParams } from 'react-router-dom'; import Dataloges from '../data/dataloges.json' import Collapse from "../components/Collapse"; @@ -19,7 +16,6 @@ const Location = () => { // Get the userId param from the URL. let { id } = useParams(); - // const navigate = useNavigate(); const logement = Dataloges.find((element) => element.id == id) diff --git a/src/sass/logement.scss b/src/sass/logement.scss index 1b1c93e..0173e29 100644 --- a/src/sass/logement.scss +++ b/src/sass/logement.scss @@ -3,6 +3,7 @@ flex-wrap: wrap; align-content: space-around; justify-content: center; + width: 100%; gap: 30px; background-color: rgb(241, 240, 240); border-radius: 20px; @@ -11,9 +12,10 @@ padding-left: 10px; padding-right: 10px; cursor: pointer; - @media (max-width: 700px) { - background-color: white; - } + + @media (max-width: 700px) { + background-color: white; + } a { text-decoration: none; @@ -27,10 +29,11 @@ border-radius: 15px; width: 350px; height: 300px; - @media (max-width: 700px) { - width: 300px; - height: 250px; - } + + @media (max-width: 700px) { + width: 300px; + height: 250px; + } } h3 { @@ -40,13 +43,14 @@ font-size: 1.3rem; color: white; background-color: rgba(129, 54, 54, 0.5); - margin: 0; + margin: 0; height: 20%; width: 100%; border-radius: 0 0 15px 15px; text-align: center; padding-top: 10px; - &:hover{ + + &:hover { background-color: rgba(90, 58, 58, 0.8); } }