Skip to content

Commit

Permalink
remove intl errors from selected context
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Jan 25, 2025
1 parent f6fa719 commit 8fc920a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/EnhancedMap/OSMDataLayer/OSMDataLayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const generateLayer = (props, map, _leaflet) => {
key={props.intl.locale}
locale={props.intl.locale}
messages={props.intl.messages}
onError={() => {}} // Suppress errors in the console

Check warning on line 43 in src/components/EnhancedMap/OSMDataLayer/OSMDataLayer.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/EnhancedMap/OSMDataLayer/OSMDataLayer.jsx#L43

Added line #L43 was not covered by tests
textComponent="span"
>
<PropertyList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const TaskFeatureLayer = (props) => {
key={props.intl.locale}
locale={props.intl.locale}
messages={props.intl.messages}
onError={() => {}} // Suppress errors in the console

Check warning on line 43 in src/components/EnhancedMap/TaskFeatureLayer/TaskFeatureLayer.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/EnhancedMap/TaskFeatureLayer/TaskFeatureLayer.jsx#L43

Added line #L43 was not covered by tests
textComponent="span"
>
<PropertyList featureProperties={featureProperties} onBack={onBack} />
Expand All @@ -61,7 +62,11 @@ const TaskFeatureLayer = (props) => {
mrLayerLabel={layerLabel}
data={featureCollection(features)}
pointToLayer={(point, latLng) => {
return L.marker(latLng, { pane, mrLayerLabel: layerLabel, mrLayerId: mrLayerId });
return L.marker(latLng, {
pane,
mrLayerLabel: layerLabel,
mrLayerId: mrLayerId,
});

Check warning on line 69 in src/components/EnhancedMap/TaskFeatureLayer/TaskFeatureLayer.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/EnhancedMap/TaskFeatureLayer/TaskFeatureLayer.jsx#L65-L69

Added lines #L65 - L69 were not covered by tests
}}
onEachFeature={(feature, layer) => {
const styleableFeature = _isFunction(feature.styleLeafletLayer)
Expand Down
1 change: 1 addition & 0 deletions src/components/TaskPane/TaskMap/TaskMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export const TaskMapContent = (props) => {
key={`${description}-${index}`}
locale={props.intl.locale}
messages={props.intl.messages}
onError={() => {}} // Suppress errors in the console

Check warning on line 165 in src/components/TaskPane/TaskMap/TaskMap.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/TaskPane/TaskMap/TaskMap.jsx#L165

Added line #L165 was not covered by tests
textComponent="span"
>
<PropertyList
Expand Down
1 change: 1 addition & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const ConnectedIntl = WithUserLocale((props) => (
key={props.locale}
locale={props.locale}
messages={props.messages}
onError={() => {}} // Suppress errors in the console

Check warning on line 60 in src/index.jsx

View check run for this annotation

Codecov / codecov/patch

src/index.jsx#L60

Added line #L60 was not covered by tests
textComponent="span"
>
{props.children}
Expand Down
2 changes: 1 addition & 1 deletion src/setupTests.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ global.withProvider = (ui, { store = reduxStore, ...renderOptions } = {}) => {
return (
<Fragment>
<Provider store={store}>
<IntlProvider locale="en">
<IntlProvider locale="en" onError={() => {}}>
<Router history={routerHistory}>{children}</Router>
</IntlProvider>
</Provider>
Expand Down

0 comments on commit 8fc920a

Please sign in to comment.