Skip to content

Commit

Permalink
Merge edc2838 into 5cde1ff
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJoensuu committed Aug 31, 2023
2 parents 5cde1ff + edc2838 commit 142da39
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions recommender-front/src/components/map/MapComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '../../assets/style.css';

function MapComponent({
poiData, time, handleSetOrigin, userPosition, handleSetDestination, routeCoordinates,
headerHidden, toggleHeader,
headerHidden, toggleHeader, showToggleHeaderButton = true,
}) {
const position = [60.2049, 24.9649];
const minZoom = 12;
Expand All @@ -19,9 +19,11 @@ function MapComponent({

return (
<div className={`map-container${headerHidden ? ' fullscreen' : ''}`}>
<button type="button" className="toggle-header-button" onClick={toggleHeader}>
{headerHidden ? <FullscreenIcon /> : <FullscreenExitIcon />}
</button>
{showToggleHeaderButton && (
<button type="button" className="toggle-header-button" onClick={toggleHeader}>
{headerHidden ? <FullscreenIcon /> : <FullscreenExitIcon />}
</button>
)}
<MapContainer
id="map"
center={position}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ function SimulatorFormComponent({
<Typography>Precipitation</Typography>
<CustomTextField
name="precipitation"
placeholder="Precipitation (%)"
placeholder="Precipitation mm)"
value={simulatedWeatherData.precipitation}
handleInputChange={handleInputChange}
helperText="%"
helperText="mm"
/>
<Typography>Cloud Amount</Typography>
<CustomTextField
Expand Down
1 change: 1 addition & 0 deletions recommender-front/src/pages/SimulatorPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function SimulatorPage() {
<MapComponent
poiData={poiData}
time="Weather"
showToggleHeaderButton={false}
/>
{isNightTime && <div className="night-overlay" data-testid="night-overlay" />}
</div>
Expand Down

0 comments on commit 142da39

Please sign in to comment.