Skip to content

Commit

Permalink
chore: Continue ignoring navigate() Promise
Browse files Browse the repository at this point in the history
> Because React 19 will have first-class support for handling promises
> in the render pass (via React.use and useAction), we are now comfortable
> exposing the promises for the APIs that previously returned undefined

https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#exposed-router-promises

... which means we can void the return value without change in behavior.
  • Loading branch information
meyfa committed Nov 30, 2024
1 parent e73d78c commit 23f928d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/Job.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const JobStatus: FunctionComponent<{
if (props.job.settings.debugLogging != null) {
params.set('debugLogging', props.job.settings.debugLogging.toString())
}
navigate(`/trigger?${params.toString()}`)
void navigate(`/trigger?${params.toString()}`)
}, [props.job, navigate])

const common = (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Trigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const Trigger: FunctionComponent = () => {
// redirect to job page when jobData is available
useEffect(() => {
if (jobData != null) {
navigate(`/jobs/${encodeURIComponent(jobData.namespace)}/${encodeURIComponent(jobData.name)}`)
void navigate(`/jobs/${encodeURIComponent(jobData.namespace)}/${encodeURIComponent(jobData.name)}`)
}
}, [jobData, navigate])

Expand Down

0 comments on commit 23f928d

Please sign in to comment.