Skip to content

Commit

Permalink
shifted center and removed debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tam33 committed Oct 14, 2024
1 parent 978e4bb commit 0430916
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion api/supabase/queries/query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import supabase from '../createClient';

export default async function queryProjects() {
const { data: projects, error } = await supabase.from('Projects').select('*');
const { data: projects, error } = await supabase
.from('Projects')
.select('*')
.eq('approved', true);

console.log('PROJECTS', projects, 'ERROR', error);

Expand Down
9 changes: 3 additions & 6 deletions components/Map/map.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { useCallback, useState } from 'react';
import { GoogleMap, Marker, useJsApiLoader } from '@react-google-maps/api';
import { GoogleMap, useJsApiLoader } from '@react-google-maps/api';
import addMarker from '../../api/maps/addMarker';
import { Project } from '../../types/helper';

Expand All @@ -11,8 +11,8 @@ const containerStyle = {
};

const center = {
lat: 40.7128,
lng: -74.006,
lat: 43.0481,
lng: -76.1474,
};

const zoom = 7;
Expand All @@ -36,16 +36,13 @@ export default function Map(props: { projects: Project[] | null }) {
setMap(null);
}, []);

console.log('hiii: ', props.projects);

return isLoaded ? (
<GoogleMap
mapContainerStyle={containerStyle}
onLoad={onLoad}
onUnmount={onUnmount}
>
{addMarker(props.projects)}
<Marker position={{ lat: 40.7128, lng: -74.006 }}></Marker>
</GoogleMap>
) : (
<></>
Expand Down

0 comments on commit 0430916

Please sign in to comment.