-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboard: show FallbackMap in case operator has no subsections
- Loading branch information
1 parent
ed067c7
commit b694b78
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { SubsectionWithPosition } from "src/subsections/queries/getSubsection" | ||
import { BaseMap } from "./BaseMap" | ||
import { subsectionsBbox } from "./utils" | ||
|
||
type Props = { subsections: SubsectionWithPosition[] } | ||
|
||
export const ProjectMapFallback: React.FC<Props> = ({ subsections }) => { | ||
return ( | ||
<section className="mt-3 relative"> | ||
<BaseMap | ||
id="mainMap" | ||
initialViewState={{ | ||
bounds: subsectionsBbox(subsections), | ||
fitBoundsOptions: { padding: 60 }, | ||
}} | ||
/> | ||
<div className="inset-x-0 mx-4 bg-white/80 p-4 px-8 text-center absolute bottom-12 font-sans"> | ||
Noch keine Planungsabschnitte angelegt | ||
</div> | ||
</section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters