Skip to content

Commit

Permalink
fix(stages): Display supermarkets before accomodations for the starti…
Browse files Browse the repository at this point in the history
…ng day
  • Loading branch information
annelhote committed Mar 9, 2024
1 parent 89d82e7 commit 999bd84
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/stage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ const Stage = ({ day, gpx, markers, meta }) => {
<div>
<b>D+:</b> {elevation.pos.toFixed(0)} m / <b>D-:</b> {elevation.neg.toFixed(0)} m
</div>
<div>
<b>Hébergements:</b>
<ul>
{getClosestMarkersByCategory({ category: 'hébergement', gpx, point: endPoint }).map((accomodation, index) => (
<li key={`accomodation-${index}`}>
{accomodation.name} / {accomodation.label} / {accomodation.lat},{accomodation.lon} / {accomodation.pointDistance.toFixed(3)} km
</li>
))}
</ul>
</div>
{(day === 0) &&
<div>
<b>Supermarchés :</b>
Expand All @@ -75,6 +65,16 @@ const Stage = ({ day, gpx, markers, meta }) => {
</ul>
</div>
}
<div>
<b>Hébergements:</b>
<ul>
{getClosestMarkersByCategory({ category: 'hébergement', gpx, point: endPoint }).map((accomodation, index) => (
<li key={`accomodation-${index}`}>
{accomodation.name} / {accomodation.label} / {accomodation.lat},{accomodation.lon} / {accomodation.pointDistance.toFixed(3)} km
</li>
))}
</ul>
</div>
{((day + 1) % 4 === 0) && (day !== 0) &&
<div>
<b>Supermarchés :</b>
Expand Down

0 comments on commit 999bd84

Please sign in to comment.