From 6efc8c8c17425d5bedd6979bad2eb25d1ba82ef3 Mon Sep 17 00:00:00 2001 From: Joe Bacal Date: Sun, 18 Aug 2024 17:14:47 -0400 Subject: [PATCH] lgging --- src/components/simulation-tab.tsx | 5 ++--- src/hooks/useCodapData.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/simulation-tab.tsx b/src/components/simulation-tab.tsx index ab12476..3c73eb5 100644 --- a/src/components/simulation-tab.tsx +++ b/src/components/simulation-tab.tsx @@ -33,8 +33,7 @@ export const SimulationTab: React.FC = ({ const { getDayLengthData, getUniqueLocationsInCodapData } = useCodapData(); const handleGetDataClick = async () => { - // console.log("| sim says to go ahead an get data with local lat, long: ", latitude, longitude); - // console.log("| also, if location is novel, we need to save it to the locations array"); + console.log("||| SIM tab click"); const name = `(${latitude}, ${longitude})`; const currentLocation: ILocation = { name, latitude: Number(latitude), longitude: Number(longitude) }; const locationExists = locations.some(item => locationsEqual(item, currentLocation)); @@ -61,7 +60,7 @@ export const SimulationTab: React.FC = ({ locations={locations} /> - diff --git a/src/hooks/useCodapData.ts b/src/hooks/useCodapData.ts index 59f3f13..86c850f 100644 --- a/src/hooks/useCodapData.ts +++ b/src/hooks/useCodapData.ts @@ -123,7 +123,7 @@ export const useCodapData = () => { const locationAttr = await getAttribute(kDataContextName, kParentCollectionName, "location"); if (locationAttr.success){ const allItems = await getAllItems(kDataContextName); - console.log("|| sync opportunity? ", allItems); + console.log("||| getting locations in CODAP data... sync opportunity ", allItems); if (allItems.success){ const uniqeLocations: ILocation[] = extractUniqueLocations(allItems.values); return uniqeLocations;