generated from WildCodeSchool/create-js-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from WildCodeSchool/dev
Dev
- Loading branch information
Showing
22 changed files
with
722 additions
and
490 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import PropTypes from "prop-types"; | ||
import { useEffect, useState } from "react"; | ||
import ButtonMini from "../Boutons/ButtonMini"; | ||
import "./card-model.css"; | ||
import { useGlobalContext } from "../../contexts/GlobalContext"; | ||
|
||
function CardOffer() { | ||
const globalContext = useGlobalContext(); | ||
const [offers, setOffers] = useState([]); | ||
useEffect(() => { | ||
const getAllOffer = async () => { | ||
try { | ||
const response = await globalContext.apiService.get( | ||
`${import.meta.env.VITE_BACKEND_URL}/api/offer` | ||
); | ||
setOffers(response.data); | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}; | ||
getAllOffer(); | ||
}, []); | ||
|
||
return ( | ||
<div> | ||
{offers.map((offer) => ( | ||
<div className="card-container" key={offer.id}> | ||
<h3 className="label-offre">{offer.title}</h3> | ||
<h5 className="poste-champs"> | ||
{offer.type} - {offer.city} | ||
</h5> | ||
<h4 className="entreprise-champs">{offer.company}</h4> | ||
<p className="p-description ">{offer.mission}</p> | ||
<ButtonMini textBtn="Postuler" /> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
// return ( | ||
// <div> | ||
// {offers.map((offer) => ( | ||
// <div className="card-container" key={offer.id}> | ||
// {" "} | ||
// {/* Ajoutez une clé unique pour chaque élément de la liste */} | ||
// <h3 className="label-offre">{offer.title}</h3>{" "} | ||
// {/* Utilisez la propriété 'title' pour afficher le titre de l'offre */} | ||
// <div className="competence"> | ||
// {/* Affichez les compétences de l'offre si nécessaire */} | ||
// {offer.competences.map((competence) => ( | ||
// <h3 key={competence.id}>{competence.name}</h3> | ||
// ))} | ||
// </div> | ||
// <h5 className="poste-champs"> | ||
// {offer.type} - {offer.city} | ||
// </h5> | ||
// <h4 className="entreprise-champs">{offer.company}</h4>{" "} | ||
// {/* Utilisez la propriété 'company' pour afficher le nom de l'entreprise */} | ||
// <p className="p-description">{offer.description}</p>{" "} | ||
// {/* Utilisez la propriété 'description' pour afficher la description de l'offre */} | ||
// <ButtonMini textBtn="Postuler" /> | ||
// </div> | ||
// ))} | ||
// </div> | ||
// ); | ||
// } | ||
|
||
CardOffer.propTypes = { | ||
offer: PropTypes.shape({ | ||
id: PropTypes.number.isRequired, | ||
title: PropTypes.string.isRequired, | ||
company: PropTypes.string.isRequired, | ||
type: PropTypes.string.isRequired, | ||
city: PropTypes.string.isRequired, | ||
info: PropTypes.string.isRequired, | ||
competences: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
id: PropTypes.number.isRequired, | ||
name: PropTypes.string.isRequired, | ||
}) | ||
).isRequired, | ||
}).isRequired, | ||
}; | ||
|
||
export default CardOffer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
import { MDBFooter } from "mdb-react-ui-kit"; | ||
|
||
export default function Footer() { | ||
return ( | ||
<MDBFooter bgColor="light" className="text-center text-lg-left"> | ||
<div | ||
className="text-center p-3" | ||
style={{ backgroundColor: "#c91f61", color: "white" }} | ||
> | ||
© {new Date().getFullYear()} Copyright:{" "} | ||
<a className="text-light" href="https://mdbootstrap.com/"> | ||
Externatic.com | ||
</a> | ||
</div> | ||
</MDBFooter> | ||
); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.big-homeCard-container { | ||
padding: 60px 0; | ||
} | ||
.big-homeCard-container span { | ||
color: var(--second-color); | ||
font-weight: 600; | ||
font-style: italic; | ||
} | ||
|
||
.big-homeCard-container h1 { | ||
padding-bottom: 20px; | ||
} | ||
|
||
.homeCard-container { | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
color: black; | ||
} | ||
|
||
.card-one, | ||
.card-two, | ||
.card-three { | ||
padding: 30px 15px; | ||
margin: 20px 0; | ||
border-radius: 5px; | ||
box-shadow: 0 4px 8px rgba(85, 85, 85, 0.2); | ||
background-color: var(--background-input); | ||
} | ||
|
||
.homeCard-container i { | ||
font-size: 30px; | ||
padding-bottom: 15px; | ||
color: var(--main-color); | ||
} | ||
|
||
@media screen and (min-width: 768px) { | ||
.homeCard-container { | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: row; | ||
gap: 50px; | ||
} | ||
.card-one, | ||
.card-two, | ||
.card-three { | ||
margin: 30px 0; | ||
width: 30%; | ||
} | ||
} |
Oops, something went wrong.