diff --git a/src/components/StoreWatchPage.js b/src/components/StoreWatchPage.js index 7956f96..7648647 100644 --- a/src/components/StoreWatchPage.js +++ b/src/components/StoreWatchPage.js @@ -478,41 +478,41 @@ const StoreWatchPage = ({ ), cell: ({ row }) => ( -
{row.original.city || 'unbekannt'}
-{row.original.city || 'unbekannt'}
{row.original.street || ''}
- {(() => { - const hasUserLocation = - userLocation && - Number.isFinite(userLocation.lat) && - Number.isFinite(userLocation.lon); - const storeLat = Number(row.original.location?.lat); - const storeLon = Number(row.original.location?.lon); - const hasStoreLocation = Number.isFinite(storeLat) && Number.isFinite(storeLon); - if (!hasUserLocation || !hasStoreLocation) { - return null; - } - const origin = encodeURIComponent(`${userLocation.lat},${userLocation.lon}`); - const destination = encodeURIComponent(`${storeLat},${storeLon}`); - const mapsUrl = `https://www.google.com/maps/dir/?api=1&origin=${origin}&destination=${destination}&travelmode=driving`; - return ( - - Route in Google Maps - - - ); - })()}