Skip to content

Commit

Permalink
Merge branch 'master' into ble_scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
the-bay-kay authored Mar 22, 2024
2 parents 2e9e948 + de0ed4c commit 678d1c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
5 changes: 3 additions & 2 deletions www/js/components/LeafletView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ const LeafletView = ({ geojson, opts, downscaleTiles, cacheHtml, ...otherProps }
// After a Leaflet map is rendered, cache the map to reduce the cost for creating a map
const mapHTMLElements = document.getElementById(mapElId);
leafletCache.set(mapElId, mapHTMLElements?.innerHTML);
leafletMapRef.current?.remove();
});
}
}, [geojson, cacheHtml]);
Expand Down Expand Up @@ -154,7 +153,9 @@ const LeafletView = ({ geojson, opts, downscaleTiles, cacheHtml, ...otherProps }
dangerouslySetInnerHTML={
/* this is not 'dangerous' here because the content is not user-generated;
it's just an HTML string that we cached from a previous render */
cacheHtml && leafletCache.has(mapElId) ? { __html: leafletCache.get(mapElId) } : undefined
cacheHtml && leafletCache?.has(mapElId)
? { __html: leafletCache.get(mapElId) }
: undefined
}
/>
</View>
Expand Down
19 changes: 11 additions & 8 deletions www/js/survey/enketo/EnketoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,20 @@ const EnketoModal = ({ surveyName, onResponseSaved, opts, ...rest }: Props) => {
</a>
<a
id="validate-form"
className="btn"
className="btn btn-primary"
onClick={() => validateAndSave()}
style={{ width: 200, margin: 'auto' }}>
<Button id="validate-form" icon="check-bold" mode="contained">
{t('survey.save')}
</Button>
{/* <Button icon="check-bold" mode="contained"> */}
{t('survey.save')}
{/* </Button> */}
</a>
<a href="#" className="btn next-page disabled" style={{ width: 200, margin: 'auto' }}>
<Button icon="arrow-right-thick" mode="contained">
{t('survey.next')}
</Button>
<a
href="#"
className="btn btn-primary next-page disabled"
style={{ width: 200, margin: 'auto' }}>
{/* <Button icon="arrow-right-thick" mode="contained"> */}
{t('survey.next')}
{/* </Button> */}
</a>
<div className="enketo-power" style={{ marginBottom: 30 }}>
<span>{t('survey.powered-by')}</span>{' '}
Expand Down

0 comments on commit 678d1c3

Please sign in to comment.