Skip to content

Commit

Permalink
Add map component to assignment profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewy-gh committed Nov 11, 2024
1 parent a3c95f6 commit 3957517
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/front/src/pages/Admin/assignment/AssignProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useGoToBreadcrumb,
useInitBreadcrumbs,
} from "../../../hooks/breadcrumbHooks";

import { AssignmentsMap } from "../component/AssignmentsMap";
import ContainerTitle from "../component/ContainerTitle";
import CustomSnackbar from "../../../components/CustomSnackbar";
import { DataGrid } from "@mui/x-data-grid";
Expand Down Expand Up @@ -134,6 +134,7 @@ const AssignProfile = () => {
/>
) : (
<Box>
<AssignmentsMap />
<Stack
py={3}
justifyContent="flex-start"
Expand Down
29 changes: 29 additions & 0 deletions frontend/front/src/pages/Admin/component/AssignmentsMap.js
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>
)}
</>
);
};

0 comments on commit 3957517

Please sign in to comment.