diff --git a/apps/rowboat/app/projects/[projectId]/simulation/app.tsx b/apps/rowboat/app/projects/[projectId]/simulation/app.tsx index 0e33993a..c2564b76 100644 --- a/apps/rowboat/app/projects/[projectId]/simulation/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/simulation/app.tsx @@ -87,8 +87,8 @@ export default function SimulationApp() { const [allRunResults, setAllRunResults] = useState>({}); const [workflowVersions, setWorkflowVersions] = useState>>>({}); const [menuOpenId, setMenuOpenIdState] = useState(null); - const [currentPage, setCurrentPage] = useState(Number(searchParams.get('page')) || 1); const runsPerPage = 10; + const currentPage = Number(searchParams.get('page')) || 1; const setMenuOpenId = useCallback((id: string | null) => { setMenuOpenIdState(id); @@ -375,12 +375,6 @@ export default function SimulationApp() { } }; - // Add this effect to update currentPage when URL changes - useEffect(() => { - const page = Number(searchParams.get('page')) || 1; - setCurrentPage(page); - }, [searchParams]); - const indexOfLastRun = currentPage * runsPerPage; const indexOfFirstRun = indexOfLastRun - runsPerPage; const currentRuns = runs.slice(indexOfFirstRun, indexOfLastRun);