Skip to content

Commit

Permalink
Add link on summary, can remove if needed, but a nav back
Browse files Browse the repository at this point in the history
  • Loading branch information
acoard-aot committed Sep 29, 2023
1 parent 41d20dc commit 3daf90e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import styles from './css/summary.module.css'
import { Site } from "@/api/sites";
import { useSelector } from "react-redux";
import { RootState } from "@/store";
import { useParams } from "react-router-dom";
import { Link, useParams } from "react-router-dom";
// import 'leaflet/dist/leaflet.css'; //Unsure if necessary after included in map.tsx

export default function Summary() {
const { siteID } = useParams();
const siteIDNum = parseInt(siteID);
const site: Site = useSelector((state: RootState) => state.site.value.find(searchedSite => searchedSite.siteID === siteIDNum));

console.log('summary site', site);

return (
<div>
Expand Down Expand Up @@ -44,6 +43,9 @@ export default function Summary() {
<p><span className="fw-bolder">Documents</span>: 2</p>
<p><span className="fw-bolder">Suspect Land Use</span>: 2</p>
<p><span className="fw-bolder">Parcel Description</span>: 2</p>


<Link className='text-decoration-none' to={`/map?siteID=${site.siteID}`}>View on Map</Link>
</div>
</div>
</div>
Expand Down

0 comments on commit 3daf90e

Please sign in to comment.