diff --git a/.env b/.env new file mode 100644 index 0000000..3e7f2a2 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +# create local copy of this file and rename to .env.local +# make sure to add .env.local to .gitignore!! +MONGO_URI={mongo-uri-here} \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/new-issue.md b/.github/ISSUE_TEMPLATE/new-issue.md index 6dc29db..7bd092e 100644 --- a/.github/ISSUE_TEMPLATE/new-issue.md +++ b/.github/ISSUE_TEMPLATE/new-issue.md @@ -1,10 +1,9 @@ --- name: New Issue about: Create a new issue -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Description** @@ -14,6 +13,7 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate A clear and concise description of what you want to happen. Steps: + - step 1 - step 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c932ac1..0afb38c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,6 @@ jobs: # - Settings -> Secrets and variables -> New repository secret MONGO_URI: ${{ secrets.MONGO_URI }} # Add additional environment variables here - + - name: Run tests run: npm test diff --git a/.gitignore b/.gitignore index 8f322f0..a621357 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +prettier.config.js \ No newline at end of file diff --git a/README.md b/README.md index e1c398a..6f59d4f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ A data collection platform for tree information and location - [Getting Started And Contributing](#getting-started-and-contributing) ## Overview + The Central Coast Heritage Tree Foundation focuses on the protection, preservation, and preventive healthcare for legacy and heritage oaks in the greater Templeton area. They help heritage oaks by utilizing preventive tree care, restoring soil, planting Templeton acorns, and educating the community through conversation and connection. ### Purpose @@ -37,7 +38,6 @@ The Central Coast Heritage Tree Foundation team consists of 14 Cal Poly students - [Brandon Eng](https://www.linkedin.com/) - Software Developer - [Thomas Le](https://www.linkedin.com/) - Software Developer - ## Getting Started And Contributing Visit [getting-started.md](docs/getting-started.md) on info for how to set up this repo. diff --git a/next.config.js b/next.config.js index 767719f..658404a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,4 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = {}; -module.exports = nextConfig +module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 895dc1c..a5938b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,12 +12,14 @@ "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "framer-motion": "^11.18.0", + "leaflet": "^1.9.4", "mongoose": "^8", "next": "^15.1.6", "react": "^18", "react-dom": "^18" }, "devDependencies": { + "@types/leaflet": "^1.9.16", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", @@ -1223,6 +1225,13 @@ "tslib": "^2.8.0" } }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -1230,6 +1239,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/leaflet": { + "version": "1.9.16", + "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.16.tgz", + "integrity": "sha512-wzZoyySUxkgMZ0ihJ7IaUIblG8Rdc8AbbZKLneyn+QjYsj5q1QU7TEKYqwTr10BGSzY5LI7tJk9Ifo+mEjdFRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/@types/lodash": { "version": "4.17.14", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz", @@ -4468,6 +4487,12 @@ "node": ">=0.10" } }, + "node_modules/leaflet": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", + "license": "BSD-2-Clause" + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", diff --git a/package.json b/package.json index 8ad6457..bfd86a7 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,14 @@ "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "framer-motion": "^11.18.0", + "leaflet": "^1.9.4", "mongoose": "^8", "next": "^15.1.6", "react": "^18", "react-dom": "^18" }, "devDependencies": { + "@types/leaflet": "^1.9.16", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", diff --git a/src/app/map/page.tsx b/src/app/map/page.tsx index e64110a..b7735be 100644 --- a/src/app/map/page.tsx +++ b/src/app/map/page.tsx @@ -1,3 +1,45 @@ +"use client"; +import { useRef, useEffect } from "react"; +import { Tree, treeData } from "./tree_data"; +import styles from "@/styles/map.module.css"; +import dynamic from "next/dynamic"; +//import leaflet in client +const L = dynamic(() => import("leaflet") as any, { + ssr: false, +}); export default function Map() { - return
Collector Name | +Date Collected | +GPS Coordinates | +Photo | +DBH (inches) | +Height | +Tree Canopy Breadth | +Species | +Mistletoe | +Epicormic Growth | +Dead Wood | +Oak Pit Scale | +Hanging Items | +Additional Notes | +
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{tree.collectorName} | +{tree.dateCollected} | +{tree.gpsCoordinates} | +
+ |
+ {tree.dbh} | +{tree.height} | +{tree.canopyBreath} | +{tree.species} | +{tree.mistletoe === true ? "Yes" : "No"} | +{tree.epicormicGrowth === true ? "Yes" : "No"} | +{tree.deadWood === true ? "Yes" : "No"} | +{tree.oakPitScale === true ? "Yes" : "No"} | +{tree.hangingItems === true ? "Yes" : "No"} | +{tree.additionalNotes} | +