@@ -21,7 +21,7 @@ import {
2121 nanosecondsToMilliseconds ,
2222 tryCatch ,
2323} from "@trigger.dev/core/v3" ;
24- import type { $Enums , RuntimeEnvironmentType } from "@trigger.dev/database" ;
24+ import type { RuntimeEnvironmentType } from "@trigger.dev/database" ;
2525import { motion } from "framer-motion" ;
2626import React , { useCallback , useEffect , useRef , useState } from "react" ;
2727import { useHotkeys } from "react-hotkeys-hook" ;
@@ -280,7 +280,7 @@ export default function Page() {
280280 const tableStateSearchParams = new URLSearchParams ( tableState ) ;
281281 const filters = getRunFiltersFromSearchParams ( tableStateSearchParams ) ;
282282
283- const [ previousRunPath , nextRunPath ] = useAdjacentRunPaths ( { organization, project, environment, tableStateSearchParams , run, runsList} ) ;
283+ const [ previousRunPath , nextRunPath ] = useAdjacentRunPaths ( { organization, project, environment, tableState , run, runsList} ) ;
284284
285285 return (
286286 < >
@@ -1640,14 +1640,14 @@ function useAdjacentRunPaths({
16401640 organization,
16411641 project,
16421642 environment,
1643- tableStateSearchParams ,
1643+ tableState ,
16441644 run,
16451645 runsList,
16461646} : {
16471647 organization : { slug : string } ;
16481648 project : { slug : string } ;
16491649 environment : { slug : string } ;
1650- tableStateSearchParams : URLSearchParams ;
1650+ tableState : string ;
16511651 run : { friendlyId : string } ;
16521652 runsList : {
16531653 runs : Array < { friendlyId : string } > ;
@@ -1669,7 +1669,7 @@ function useAdjacentRunPaths({
16691669
16701670 // Determine previous run: use prevPageLastRun if at first position, otherwise use previous run in list
16711671 let previousRun : { friendlyId : string } | null = null ;
1672- const previousRunTableState = new URLSearchParams ( tableStateSearchParams . toString ( ) ) ;
1672+ const previousRunTableState = new URLSearchParams ( tableState ) ;
16731673 if ( currentIndex > 0 ) {
16741674 previousRun = runsList . runs [ currentIndex - 1 ] ;
16751675 } else if ( runsList . prevPageLastRun ) {
@@ -1681,7 +1681,7 @@ function useAdjacentRunPaths({
16811681
16821682 // Determine next run: use nextPageFirstRun if at last position, otherwise use next run in list
16831683 let nextRun : { friendlyId : string } | null = null ;
1684- const nextRunTableState = new URLSearchParams ( tableStateSearchParams . toString ( ) ) ;
1684+ const nextRunTableState = new URLSearchParams ( tableState ) ;
16851685 if ( currentIndex < runsList . runs . length - 1 ) {
16861686 nextRun = runsList . runs [ currentIndex + 1 ] ;
16871687 } else if ( runsList . nextPageFirstRun ) {
@@ -1704,7 +1704,7 @@ function useAdjacentRunPaths({
17041704 : null ;
17051705
17061706 return [ previousRunPath , nextRunPath ] ;
1707- } , [ organization , project , environment , tableStateSearchParams , run . friendlyId , runsList ] ) ;
1707+ } , [ organization , project , environment , tableState , run . friendlyId , runsList ] ) ;
17081708}
17091709
17101710
0 commit comments