Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set error dialog to map component #304

Merged
merged 2 commits into from
Oct 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/CovMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const CovMap = () => {
};

return (
<div className={classes.main}>
<div id="mapParentDiv" className={classes.main}>
<div className={classes.currentInfo}>
{/*<Typography variant="h2" color="primary">{visual.name}</Typography>*/}
<Typography variant="h2" color="primary">
Expand Down Expand Up @@ -298,7 +298,10 @@ export const CovMap = () => {
style={{
zIndex: 1190,
touchAction: "none",
position: "absolute",
}}
container={() => document.getElementById("mapParentDiv")}
BackdropProps={{ style: { position: "absolute" } }}
>
<DialogTitle
id="simple-dialog-title"
Expand Down
9 changes: 4 additions & 5 deletions src/components/FixedSearch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import makeStyles from "@material-ui/core/styles/makeStyles";
import React from "react";
import { useSelector } from "react-redux";
import { State } from "src/state";
import { Search } from "./Search";

const useStyles = makeStyles((theme) => ({
Expand All @@ -20,12 +22,9 @@ const useStyles = makeStyles((theme) => ({

const FixedSearch = () => {
const classes = useStyles();
const datasetFound = useSelector((state: State) => state.app.datasetFound);

return (
<div className={classes.searchContainer}>
<Search />
</div>
);
return <div className={classes.searchContainer}>{datasetFound === false ? null : <Search />}</div>;
};

export default FixedSearch;