Skip to content

Commit

Permalink
general: clickable POIs broken message (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz authored Oct 12, 2023
1 parent 410faaf commit d02edd8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/utils/MapStateContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ export const MapStateProvider = ({ children, initialMapView }) => {
showToast,
};

const [brokenShown, setBrokenShown] = React.useState(true);
const onBrokenClose = (event?: React.SyntheticEvent, reason?: string) => {
if (reason !== 'clickaway') {
setBrokenShown(false);
}
};
return (
<MapStateContext.Provider value={mapState}>
{children}
Expand All @@ -81,6 +87,18 @@ export const MapStateProvider = ({ children, initialMapView }) => {
{msg?.content}
</Alert>
</Snackbar>
<Snackbar open={brokenShown} onClose={onBrokenClose}>
<Alert onClose={onBrokenClose} severity="info" variant="filled">
Clickable POIs are currently broken on Maptiler –{' '}
<a
href="https://github.com/openmaptiles/openmaptiles/issues/1587"
style={{ color: '#fff', textDecoration: 'underline' }}
>
issue here
</a>
.
</Alert>
</Snackbar>
</MapStateContext.Provider>
);
};
Expand Down

1 comment on commit d02edd8

@vercel
Copy link

@vercel vercel bot commented on d02edd8 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

osmapp – ./

osmapp-git-master-zbycz.vercel.app
osmapp.vercel.app
osmapp.org
osmapp-zbycz.vercel.app

Please sign in to comment.