Commit b96be96
committed
client: Fix CheckAuthorization redirection
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.1 parent 903d576 commit b96be96
3 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
98 | 112 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
0 commit comments