diff --git a/frontend/src/components/BeamtimeOverview.tsx b/frontend/src/components/BeamtimeOverview.tsx index b1032dc..9c8d01c 100644 --- a/frontend/src/components/BeamtimeOverview.tsx +++ b/frontend/src/components/BeamtimeOverview.tsx @@ -119,7 +119,7 @@ const BeamtimeOverview: React.FC = ({ activePgroup }) => // Navigate to the ResultsView page for the selected beamtime const handleViewResults = (beamtimeId: number) => { - navigate(`/results/${beamtimeId}`); // Pass the beamtimeId in the URL + navigate(`/results/${beamtimeId}?pgroup=${activePgroup}`); }; return ( diff --git a/frontend/src/components/ResultGrid.tsx b/frontend/src/components/ResultGrid.tsx index 3a0ebf9..a67b3eb 100644 --- a/frontend/src/components/ResultGrid.tsx +++ b/frontend/src/components/ResultGrid.tsx @@ -13,7 +13,6 @@ import HourglassEmptyIcon from '@mui/icons-material/HourglassEmpty'; - // Extend your image info interface if needed. interface ImageInfo { id: number; diff --git a/frontend/src/pages/ResultsView.tsx b/frontend/src/pages/ResultsView.tsx index 46e1929..b94ef64 100644 --- a/frontend/src/pages/ResultsView.tsx +++ b/frontend/src/pages/ResultsView.tsx @@ -1,13 +1,16 @@ import React from 'react'; -import { useParams } from 'react-router-dom'; +import { useParams, useSearchParams} from 'react-router-dom'; import SampleTracker from '../components/SampleTracker'; import ResultGrid from '../components/ResultGrid'; + interface ResultsViewProps {} const ResultsView: React.FC = () => { // Get the selected beamtime ID from the URL const { beamtimeId } = useParams(); + const [searchParams] = useSearchParams(); + const activePgroup = searchParams.get("pgroup") ?? ''; return (
@@ -15,8 +18,8 @@ const ResultsView: React.FC = () => {

Results for Beamtime ID: {beamtimeId}

{/* Use the beamtimeId to filter or query specific results */} - - + +
); };