Skip to content

Conversation

@jtojnar
Copy link
Member

@jtojnar jtojnar commented Oct 28, 2025

Oops, fixed it twice. Once in #1457 and second time, partially, in a527aed. Cherry picking the more complete fix from the TypeScript branch alongside with extra redirection fix.

react-router 6 expects state to be passed in the `state` property of the second argument.

I accidentally broke that in 88deede.
We really need static typing.

Partly fixed in a527aed.
The `CheckAuthorization` was no longer redirecting to the `/sign/in` page and the following warning was logged into the console:

> You should call navigate() in a React.useEffect(), not when your component is first rendered.

Probably regressed in 88deede.

Let’s fix the redirection.

Using polyfill for `useEffectEvent` from react 1.19.2 to get `eslint-plugin-react-hooks` of our back.

Keeping the error message in the body to have some content in case the effect is slow.
@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for selfoss canceled.

Name Link
🔨 Latest commit b96be96
🔍 Latest deploy log https://app.netlify.com/projects/selfoss/deploys/6900e8d269d8a1000872e0fc

@jtojnar jtojnar merged commit b96be96 into master Oct 28, 2025
15 checks passed
@jtojnar jtojnar deleted the nav-fix branch October 28, 2025 16:14
@jtojnar jtojnar added this to the 2.20 milestone Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants