Decrease map page height if banner is enabled (for #272)
This commit is contained in:
parent
5cfc8aae39
commit
fc930fe433
|
@ -4,6 +4,7 @@ import { connect } from "react-redux";
|
|||
import { Button } from "semantic-ui-react";
|
||||
import { Layer, Source } from "react-map-gl";
|
||||
import produce from "immer";
|
||||
import classNames from "classnames";
|
||||
|
||||
import type { Location } from "types";
|
||||
import { Page, Map } from "components";
|
||||
|
@ -110,7 +111,7 @@ const getEventsTextLayer = () => ({
|
|||
});
|
||||
|
||||
function MapPage({ login }) {
|
||||
const { obsMapSource } = useConfig() || {};
|
||||
const { obsMapSource, banner } = useConfig() || {};
|
||||
const [clickLocation, setClickLocation] = useState<Location | null>(null);
|
||||
|
||||
const mapConfig = useMapConfig();
|
||||
|
@ -198,7 +199,12 @@ function MapPage({ login }) {
|
|||
|
||||
return (
|
||||
<Page fullScreen title="Map">
|
||||
<div className={styles.mapContainer}>
|
||||
<div
|
||||
className={classNames(
|
||||
styles.mapContainer,
|
||||
banner ? styles.hasBanner : null
|
||||
)}
|
||||
>
|
||||
{layerSidebar && (
|
||||
<div className={styles.mapSidebar}>
|
||||
<LayerSidebar />
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
position: relative;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
|
||||
&.hasBanner {
|
||||
height: calc(100vh - @menuHeight - 50px);
|
||||
}
|
||||
}
|
||||
|
||||
.mapSidebar {
|
||||
|
|
Loading…
Reference in a new issue