-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add map component to assignment profile page
- Loading branch information
1 parent
a3c95f6
commit 3957517
Showing
2 changed files
with
31 additions
and
1 deletion.
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
29 changes: 29 additions & 0 deletions
29
frontend/front/src/pages/Admin/component/AssignmentsMap.js
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,29 @@ | ||
import { useState } from "react"; | ||
import { Button } from "@mui/material"; | ||
|
||
export const AssignmentsMap = () => { | ||
const [mapVisible, setMapVisible] = useState(false); | ||
return ( | ||
<> | ||
{mapVisible ? ( | ||
<div> | ||
<iframe | ||
src="https://www.google.com/maps/d/u/1/embed?mid=1w7GltFfO52CSl460ju2tkSUUVOXgL9g&ehbc=2E312F&z=13&noprof=1" | ||
width="640" | ||
height="480" | ||
title="BostonHPA Surveying Clusters" | ||
></iframe> | ||
<div style={{ paddingBlock: "1rem" }}> | ||
<Button variant="contained" onClick={() => setMapVisible(false)}> | ||
Close Map | ||
</Button> | ||
</div> | ||
</div> | ||
) : ( | ||
<Button variant="contained" onClick={() => setMapVisible(true)}> | ||
Show Assignments Map | ||
</Button> | ||
)} | ||
</> | ||
); | ||
}; |