Skip to content

Commit

Permalink
fix: issue Greenstand#166 The mapdrawer overlap the tree panel
Browse files Browse the repository at this point in the history
  • Loading branch information
fustroli committed Nov 19, 2021
1 parent 6a76626 commit b387e32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
5 changes: 2 additions & 3 deletions src/components/MapDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ const style = (theme) => ({
});

function MapDrawer(props) {
const { classes } = props;
const [open, setOpen] = React.useState(true);
const [wallet, setWallet] = React.useState(undefined);
const { classes, open, setOpen } = props;
const [wallet, setWallet] = React.useState({});
const [tokens, setTokens] = React.useState([]);

// console.log("Tokens List", tokens)
Expand Down
5 changes: 4 additions & 1 deletion src/components/MapPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const style = () => ({

function MapPage(props) {
const { classes } = props;
const [open, setOpen] = React.useState(true);
const mapRef = React.useRef(null);
const containerRef = React.useRef(null);
const [isDrawer, setDrawer] = React.useState(false);
Expand Down Expand Up @@ -53,7 +54,9 @@ function MapPage(props) {
return (
<div className="App" ref={containerRef}>
<div id="map-canvas" className={classes.map} ref={mapRef} />
<div ref={containerRef}>{isDrawer && <MapDrawer />}</div>
<div ref={containerRef}>
{isDrawer && <MapDrawer open={open} setOpen={setOpen} />}
</div>
</div>
);
}
Expand Down
25 changes: 0 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3928,13 +3928,6 @@
"resolved" "https://registry.nlark.com/binary-extensions/download/binary-extensions-2.2.0.tgz"
"version" "2.2.0"

"bindings@^1.5.0":
"integrity" "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== sha1-EDU8npRTNLwFEabZCzj7x8nFBN8="
"resolved" "https://registry.nlark.com/bindings/download/bindings-1.5.0.tgz"
"version" "1.5.0"
dependencies:
"file-uri-to-path" "1.0.0"

"blob-util@^2.0.2":
"integrity" "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== sha1-O048KBERu38REoUYAGzcYLQDoes="
"resolved" "https://registry.nlark.com/blob-util/download/blob-util-2.0.2.tgz"
Expand Down Expand Up @@ -7343,19 +7336,6 @@
"resolved" "https://registry.nlark.com/fs.realpath/download/fs.realpath-1.0.0.tgz"
"version" "1.0.0"

"fsevents@^1.2.7":
"integrity" "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg="
"resolved" "https://registry.npmmirror.com/fsevents/download/fsevents-1.2.13.tgz"
"version" "1.2.13"
dependencies:
"bindings" "^1.5.0"
"nan" "^2.12.1"

"fsevents@^2.1.2", "fsevents@^2.1.3", "fsevents@~2.3.2":
"integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro="
"resolved" "https://registry.npmmirror.com/fsevents/download/fsevents-2.3.2.tgz"
"version" "2.3.2"

"function-bind@^1.1.1":
"integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0="
"resolved" "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz"
Expand Down Expand Up @@ -10327,11 +10307,6 @@
"arrify" "^2.0.1"
"minimatch" "^3.0.4"

"nan@^2.12.1":
"integrity" "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== sha1-PzSkc/8Y4VwbVia2KQO1rW5mX+4="
"resolved" "https://registry.nlark.com/nan/download/nan-2.15.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnan%2Fdownload%2Fnan-2.15.0.tgz"
"version" "2.15.0"

"nanoid@^3.1.23":
"integrity" "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== sha1-CcoydHwOVD8OGBS303k0d/nI4VI="
"resolved" "https://registry.npmmirror.com/nanoid/download/nanoid-3.1.25.tgz?cache=0&sync_timestamp=1634166192601&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fnanoid%2Fdownload%2Fnanoid-3.1.25.tgz"
Expand Down

0 comments on commit b387e32

Please sign in to comment.