diff --git a/assets/js/Root.js b/assets/js/Root.js index 60e694a..9d252ac 100644 --- a/assets/js/Root.js +++ b/assets/js/Root.js @@ -8,7 +8,6 @@ import ExampleMarker2 from '../img/exampleMarker2.svg'; import SpecialExampleMarker from '../img/specialExampleMarker.svg'; const Main = styled.div` - box-sizing: border-box; width: 100%; height: 100%; `; @@ -30,6 +29,7 @@ const Root = () => { position: {latitude: 47.850670, longitude: 13.090983}, text: 'This is an example', additionalInfo: 'Sportplatz', + website: 'example.invalid.tld', hours: { sunday: [{from: ['7', '0'], until: ['22', '0']}], monday: [{from: ['7', '0'], until: ['22', '0']}], @@ -38,7 +38,6 @@ const Root = () => { thursday: [{from: ['7', '0'], until: ['22', '0']}], friday: [{from: ['7', '0'], until: ['22', '0']}], saturday: [{from: ['7', '0'], until: ['22', '0']}], - }, }, { @@ -48,10 +47,10 @@ const Root = () => { icon: SpecialExampleMarker, hours: { sunday: false, - monday: true, + monday: false, tuesday: false, - wednesday: [{from: ['9', '0'], until: ['23', '0']}], - thursday: [{from: ['15', '0'], until: ['24', '0']}], + wednesday: false, + thursday: false, friday: false, saturday: false, }, diff --git a/assets/js/components/ButterflyMap.js b/assets/js/components/ButterflyMap.js index e44e3d7..c11087b 100644 --- a/assets/js/components/ButterflyMap.js +++ b/assets/js/components/ButterflyMap.js @@ -62,6 +62,7 @@ export const ButterflyMap = (props) => { const [centerMapDisabled, setCenterMapDisabled] = React.useState(true); const [paginationPage, setPaginationPage] = React.useState(1); const [hideMap, setHideMap] = React.useState(false); + const [hoursSet, setHoursSet] = React.useState(false); const [viewport, setViewport] = React.useState({ ...props.center, @@ -281,6 +282,7 @@ export const ButterflyMap = (props) => { setReduceMotion={setReduceMotion} hideMap={hideMap} setHideMap={setHideMap} + hoursSet={hoursSet} /> {!hideMap && <> { - {props.localStrings?.centerMap ?? 'Center map on current location'} + + {props.localStrings?.centerMap ?? 'Center map on current location'} + } {typeOptions.length > 0 && { localStrings={props.localStrings} page={paginationPage} setPage={setPaginationPage} + setHoursSet={setHoursSet} />} ; }; diff --git a/assets/js/components/ControlBar.js b/assets/js/components/ControlBar.js index 2a47f94..43d67d3 100644 --- a/assets/js/components/ControlBar.js +++ b/assets/js/components/ControlBar.js @@ -253,6 +253,7 @@ const ControlBar = (props) => { setReduceMotion, hideMap, setHideMap, + hoursSet } = props; return @@ -267,14 +268,14 @@ const ControlBar = (props) => { {localStrings?.showAll ?? 'Show all'} -
  • + {hoursSet &&
  • -
  • + } {options.map((option, index) => { return