Skip to content
Snippets Groups Projects
Commit 85b3d93d authored by Moritz Stückler's avatar Moritz Stückler :cowboy:
Browse files

fix: allow baseurl prop

parent 5a72414c
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,10 @@ interface Props { ...@@ -15,9 +15,10 @@ interface Props {
data: any; data: any;
mapboxToken: string; mapboxToken: string;
className?: string; className?: string;
baseUrl?: string;
} }
const FabCityMap: React.FC<Props> = ({ data, mapboxToken, className }) => { const FabCityMap: React.FC<Props> = ({ data, mapboxToken, className, baseUrl }) => {
const selectedPoi = useStore((state) => state.selectedPoi); const selectedPoi = useStore((state) => state.selectedPoi);
const setPoiData = useStore((state) => state.setPoiData); const setPoiData = useStore((state) => state.setPoiData);
...@@ -27,10 +28,14 @@ const FabCityMap: React.FC<Props> = ({ data, mapboxToken, className }) => { ...@@ -27,10 +28,14 @@ const FabCityMap: React.FC<Props> = ({ data, mapboxToken, className }) => {
return ( return (
<MapProvider> <MapProvider>
<Router> <Router {...(baseUrl ? { baseUrl } : {})}>
<ErrorModal /> <ErrorModal />
<Notification /> <Notification />
<div className={`fcmap-flex md:fcmap-flex-row-reverse fcmap-flex-col fcmap-h-full fcmap-bg-white ${className || ''}`}> <div
className={`fcmap-flex md:fcmap-flex-row-reverse fcmap-flex-col fcmap-h-full fcmap-bg-white ${
className || ''
}`}
>
<Route path="/"> <Route path="/">
<Map mapboxToken={mapboxToken} /> <Map mapboxToken={mapboxToken} />
</Route> </Route>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment