Skip to content

Commit

Permalink
Uncomment redirect logic in download page
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams authored Jan 28, 2025
1 parent ccd60f5 commit 976d08d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ const DownloadPage = ({ location }) => {
const shouldRedirect = !link

useEffect(() => {
// if (shouldRedirect) {
// navigate("/temurin/releases")
// }
if (shouldRedirect) {
navigate("/temurin/releases")

Check failure on line 52 in src/pages/download.tsx

View workflow job for this annotation

GitHub Actions / Run CI

src/pages/__tests__/download.test.tsx > Download page > renders correctly - no link

ReferenceError: navigate is not defined ❯ src/pages/download.tsx:52:7 ❯ commitHookEffectListMount node_modules/react-dom/cjs/react-dom.development.js:23189:26 ❯ commitPassiveMountOnFiber node_modules/react-dom/cjs/react-dom.development.js:24970:11 ❯ commitPassiveMountEffects_complete node_modules/react-dom/cjs/react-dom.development.js:24930:9 ❯ commitPassiveMountEffects_begin node_modules/react-dom/cjs/react-dom.development.js:24917:7 ❯ commitPassiveMountEffects node_modules/react-dom/cjs/react-dom.development.js:24905:3 ❯ flushPassiveEffectsImpl node_modules/react-dom/cjs/react-dom.development.js:27078:3 ❯ flushPassiveEffects node_modules/react-dom/cjs/react-dom.development.js:27023:14 ❯ node_modules/react-dom/cjs/react-dom.development.js:26808:9 ❯ flushActQueue node_modules/react/cjs/react.development.js:2667:24
}
}, [])

if (shouldRedirect) {
Expand Down

0 comments on commit 976d08d

Please sign in to comment.