Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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