From fe811df771cfd21a417b069dc5443f08acd2a5f7 Mon Sep 17 00:00:00 2001 From: Daniel <68309643+danielships@users.noreply.github.com> Date: Thu, 24 Sep 2026 21:58:25 +0100 Subject: [PATCH] feat(analytics): radius explorer control and gist details popup component --- .../components/analytics/GistDetailsPopup.tsx | 37 +++++++++++++++++ .../components/analytics/RadiusExplorer.tsx | 41 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 Frontend/src/components/analytics/GistDetailsPopup.tsx create mode 100644 Frontend/src/components/analytics/RadiusExplorer.tsx diff --git a/Frontend/src/components/analytics/GistDetailsPopup.tsx b/Frontend/src/components/analytics/GistDetailsPopup.tsx new file mode 100644 index 00000000..5b8e14d9 --- /dev/null +++ b/Frontend/src/components/analytics/GistDetailsPopup.tsx @@ -0,0 +1,37 @@ +import React from 'react'; + +export interface GistPopupData { + id: string; + title: string; + author: string; + createdAt: string; + geohash: string; +} + +export interface GistDetailsPopupProps { + gist?: GistPopupData | null; + onClose?: () => void; +} + +export const GistDetailsPopup: React.FC = ({ + gist, + onClose, +}) => { + if (!gist) return null; + + return ( +
+
+

{gist.title}

+ +
+
+

Author: {gist.author}

+

Geohash: {gist.geohash}

+

Created: {gist.createdAt}

+
+
+ ); +}; + +export default GistDetailsPopup; diff --git a/Frontend/src/components/analytics/RadiusExplorer.tsx b/Frontend/src/components/analytics/RadiusExplorer.tsx new file mode 100644 index 00000000..a40e3bb6 --- /dev/null +++ b/Frontend/src/components/analytics/RadiusExplorer.tsx @@ -0,0 +1,41 @@ +import React, { useState } from 'react'; + +export interface RadiusExplorerProps { + initialRadiusKm?: number; + onRadiusChange?: (radiusKm: number) => void; +} + +export const RadiusExplorer: React.FC = ({ + initialRadiusKm = 5, + onRadiusChange, +}) => { + const [radius, setRadius] = useState(initialRadiusKm); + + const handleChange = (val: number) => { + setRadius(val); + onRadiusChange?.(val); + }; + + return ( +
+

+ Radius Spatial Explorer +

+
+ handleChange(Number(e.target.value))} + className="flex-1" + /> + + {radius} km + +
+
+ ); +}; + +export default RadiusExplorer;