Skip to content

Commit

Permalink
API UPDATE
Browse files Browse the repository at this point in the history
  • Loading branch information
gupta-arpan committed May 24, 2023
1 parent 7447dee commit b77b655
Show file tree
Hide file tree
Showing 5 changed files with 485 additions and 339 deletions.
86 changes: 78 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@react-google-maps/api": "^2.18.1",
"appwrite": "^11.0.0",
"dotenv": "^16.0.3",
"google-maps-react-markers": "^1.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.8.0",
Expand All @@ -25,6 +25,8 @@
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react-swc": "^3.0.0",
"autoprefixer": "^10.4.14",
"dotenv": "^16.0.3",
"dotenv-webpack": "^8.0.1",
"eslint": "^8.38.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
7 changes: 3 additions & 4 deletions src/components/Map.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { GoogleMap, useJsApiLoader } from "@react-google-maps/api";
import { GoogleMap, useJsApiLoader, Marker } from "@react-google-maps/api";
import { useCallback, useState } from "react";

function Map() {

const { isLoaded } = useJsApiLoader({
id: "google-map-script",
googleMapsApiKey: import.meta.env.REACT_APP_GOOGLE_MAP_API_KEY,
googleMapsApiKey: import.meta.env.VITE_REACT_APP_GOOGLE_MAP_API_KEY,
});
const [map, setMap] = useState(null)

Expand All @@ -28,8 +28,7 @@ function Map() {
onLoad={onLoad}
onUnmount={onUnmount}
>
{/* Child components, such as markers, info windows, etc. */}
<></>

</GoogleMap>
) : (
<div>Loading...</div>
Expand Down
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import dotenv from "dotenv";

dotenv.config();

// https://vitejs.dev/config/
export default defineConfig({
Expand Down
Loading

0 comments on commit b77b655

Please sign in to comment.