diff --git a/.gitignore b/.gitignore index 7d84f9bbaa0ade4f1b922865118d16d6daffbae7..97a81202cb06012fae63e3636b6024891eb6e670 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ build node_modules .idea -.vscode \ No newline at end of file +.vscode +.env \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4d990a5f0b9268238ab626496a36c30a510bf0df..b4baef7d5ef5d638b5c60b2f98d699b7d5df036d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "tailwindcss": "^2.0.3" }, "devDependencies": { - "@snowpack/plugin-dotenv": "^2.0.5", + "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-postcss": "^1.1.0", "@snowpack/plugin-react-refresh": "^2.4.0", "@snowpack/plugin-typescript": "^1.2.0", @@ -349,9 +349,9 @@ } }, "node_modules/@snowpack/plugin-dotenv": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@snowpack/plugin-dotenv/-/plugin-dotenv-2.0.5.tgz", - "integrity": "sha512-y54lwYRDpTfDTU3uopHLND0DKIjjyWiYxhvOPfZvC4OpOd7UIRwMdSOd5XLZJPEBJ4BD38lDLiXh+ODfNDqhnQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@snowpack/plugin-dotenv/-/plugin-dotenv-2.1.0.tgz", + "integrity": "sha512-NvwB+kQuxKheZLWrRvOgXB8i0cXhuIkljbgCn02fRGCIOigPIDk1jZrnn3x9skqqtul/XvW9dNulVi6Fa7CN6g==", "dev": true, "dependencies": { "dotenv": "^8.2.0", @@ -1215,6 +1215,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/heroicons-react/-/heroicons-react-1.3.0.tgz", "integrity": "sha512-gz1XE6/BsuVfyBM/RiDMgapPmrf2ZrDcF8GxJ26PJTPQnEbDFs9TPzpJ5IDPQLpUor/qshPbVDv20yWIwhMwyA==", + "deprecated": "Official Heroicons V1 released. Please use the following for future projects: https://www.npmjs.com/package/@heroicons/react", "peerDependencies": { "react": ">=16.13" } @@ -3011,9 +3012,9 @@ "requires": {} }, "@snowpack/plugin-dotenv": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@snowpack/plugin-dotenv/-/plugin-dotenv-2.0.5.tgz", - "integrity": "sha512-y54lwYRDpTfDTU3uopHLND0DKIjjyWiYxhvOPfZvC4OpOd7UIRwMdSOd5XLZJPEBJ4BD38lDLiXh+ODfNDqhnQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@snowpack/plugin-dotenv/-/plugin-dotenv-2.1.0.tgz", + "integrity": "sha512-NvwB+kQuxKheZLWrRvOgXB8i0cXhuIkljbgCn02fRGCIOigPIDk1jZrnn3x9skqqtul/XvW9dNulVi6Fa7CN6g==", "dev": true, "requires": { "dotenv": "^8.2.0", diff --git a/package.json b/package.json index 42f0d323dfb57d998f79fcdc13c0dde1fecb0d13..45363c011afccf6649e254583b3cd7cba9a3f9f7 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "tailwindcss": "^2.0.3" }, "devDependencies": { - "@snowpack/plugin-dotenv": "^2.0.5", + "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-postcss": "^1.1.0", "@snowpack/plugin-react-refresh": "^2.4.0", "@snowpack/plugin-typescript": "^1.2.0", diff --git a/snowpack.config.js b/snowpack.config.js index b7eb286d1379ab93397daad0d1a996f8d8a0ad3c..829a8547b53b3852369d10d4f16948067f3f2ae2 100644 --- a/snowpack.config.js +++ b/snowpack.config.js @@ -9,6 +9,7 @@ module.exports = { '@snowpack/plugin-dotenv', '@snowpack/plugin-typescript', '@snowpack/plugin-postcss', + '@snowpack/plugin-dotenv', ], routes: [ /* Enable an SPA Fallback in development: */ diff --git a/src/Map/Map.tsx b/src/Map/Map.tsx index d08b30accd02dc352d9f571be5aeee2e0d7d0d52..edcb0780a05bc5825fa4009894aa486160841f94 100644 --- a/src/Map/Map.tsx +++ b/src/Map/Map.tsx @@ -41,7 +41,7 @@ export const Map: React.FC<Props> = (props) => { url="https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}" id="mapbox/streets-v11" tileSize={512} - accessToken="pk.eyJ1IjoicHJleWEyayIsImEiOiJja202N2JucGowbGU4MnB1aWtxNGkzMW9jIn0.rVBLRZtohLEgdSLO0nlWng" + accessToken={import.meta.env.SNOWPACK_PUBLIC_MAPBOX_TOKEN} zoomOffset={-1} maxZoom={18} /> diff --git a/src/Sidebar/SidebarSingleView.tsx b/src/Sidebar/SidebarSingleView.tsx index 7cde8f1df06848cdd1e32a8879fe2c1f3ec9c381..614073680606d391d5ec2c21f2e2cf7c64bfeca9 100644 --- a/src/Sidebar/SidebarSingleView.tsx +++ b/src/Sidebar/SidebarSingleView.tsx @@ -1,7 +1,7 @@ import React, { CSSProperties } from 'react'; import SidebarContainer from './SidebarContainer'; import type { PointOfInterest } from '../types/PointOfInterest'; -import { X as CloseIcon, HomeOutline as HomeIcon } from 'heroicons-react'; +import { X as CloseIcon, HomeOutline as HomeIcon, LocationMarkerOutline as AddressIcon } from 'heroicons-react'; interface Props { style?: CSSProperties; @@ -18,7 +18,6 @@ const SidebarSingleView: React.FC<Props> = ({ value, onClose, ...restProps }) => className="absolute left-5 top-5 p-1 text-gray-500 inline-block cursor-pointer hover:bg-gray-300 hover:bg-opacity-50 rounded-full" onClick={onClose} /> - <img className="lg:h-48 md:h-36 w-full object-cover object-center" src={value.image} alt="blog" /> <div className="p-6"> <h2 className="tracking-widest text-xs title-font font-medium text-gray-400 mb-1">{value.category}</h2> @@ -32,6 +31,12 @@ const SidebarSingleView: React.FC<Props> = ({ value, onClose, ...restProps }) => </a> </div> )} + {value.address && ( + <div className={'flex items-center mt-3'}> + <AddressIcon size={18} className={'text-gray-500 mr-2'} /> + <div className="text-sm text-gray-500">{value.address}</div> + </div> + )} </div> </SidebarContainer> );