From 8b52eaaf34a8730494d314938b9a58fdba086187 Mon Sep 17 00:00:00 2001 From: Luc Date: Thu, 1 Aug 2024 11:19:24 +0000 Subject: [PATCH] Leaflet --- engine/src/routes/index.html | 2 +- web/src/components/ActiveSessionsTable.tsx | 13 +++---------- web/src/components/LeafletPreview.tsx | 5 +++-- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/engine/src/routes/index.html b/engine/src/routes/index.html index 5d95433..ea9ded2 100644 --- a/engine/src/routes/index.html +++ b/engine/src/routes/index.html @@ -1,7 +1,7 @@ - enstate.rs - Lightweight ENS API + v3x.property - Asset Tracking API diff --git a/web/src/components/ActiveSessionsTable.tsx b/web/src/components/ActiveSessionsTable.tsx index d6e28b7..63c07a1 100644 --- a/web/src/components/ActiveSessionsTable.tsx +++ b/web/src/components/ActiveSessionsTable.tsx @@ -9,9 +9,9 @@ import { getRelativeTimeString } from '../util/date'; import { LeafletPreview } from './LeafletPreview'; const ActiveSession: FC<{ session: SessionResponse }> = ({ session }) => { - const { data: sessions, mutate: updateSessions } = useSessions(); + const { mutate: updateSessions } = useSessions(); const { token } = useAuth(); - const { data: geoip } = useGeoIp('77.162.232.110' /* session.user_ip */); + const { data: geoip } = useGeoIp(session.user_ip); const user_agent = UAParser(session.user_agent); const last_accessed = new Date(session.last_access); const last_accessed_formatted = getRelativeTimeString(last_accessed); @@ -28,16 +28,10 @@ const ActiveSession: FC<{ session: SessionResponse }> = ({ session }) => { {geoip?.latitude && (
- {/*