diff --git a/frontend-next/src/components/app/map/geo.js b/frontend-next/src/components/app/map/geo.js
index 4453ce6..24daf29 100644
--- a/frontend-next/src/components/app/map/geo.js
+++ b/frontend-next/src/components/app/map/geo.js
@@ -3,7 +3,6 @@ import { database } from "../../../../firebase-config";
import { ref, get } from "firebase/database";
import { useState, useEffect } from "react";
-
// ONLY nearby markers
function NearbyRoomMarkers({ loc, user }) {
const [markerArr, setMarkerArr] = useState([]);
@@ -16,10 +15,12 @@ function NearbyRoomMarkers({ loc, user }) {
"/";
// Sorry for the href but doesn't work here
- const handleMarkerClick = (name) => {
- window.location.href = "/chat?room=" + path + name;
+ const handleRoomMarkerClick = (roomObj) => {
+ window.location.href =
+ "/chat?room=" + path + roomObj.name + "-" + roomObj.timestamp;
};
+ // Mostly copied Nick's code from before
useEffect(() => {
if (loc && user) {
get(ref(database, `/rooms/${path}`)).then((snapshot) => {
@@ -28,13 +29,15 @@ function NearbyRoomMarkers({ loc, user }) {
const newMarkers = Object.values(rooms).map((roomObj, index) => {
const markerKey = roomObj.path + "-" + index;
+ console.log("RoomObj", roomObj);
return (
+ // Want to change this to be something other than markers (or something extra)