Skip to content

Commit

Permalink
commit final après soutenance
Browse files Browse the repository at this point in the history
  • Loading branch information
fatydm committed Jul 29, 2024
1 parent 1b4c2bc commit 878c353
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
4 changes: 0 additions & 4 deletions src/components/Carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions src/pages/Location.jsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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";
Expand All @@ -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)

Expand Down
22 changes: 13 additions & 9 deletions src/sass/logement.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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 {
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 878c353

Please sign in to comment.