Commit efdf6d1
authored
Fix auth hooks, enabled state in panel doesnt match hook state if disabled (supabase#43326)
## Context
If an auth hook is disabled, clicking "Configure hook" will incorrectly
show the enable toggle as true
<img width="1095" height="265" alt="image"
src="https://github.com/user-attachments/assets/72b4104c-658d-44fd-baca-1102aefc3fb3"
/>
<img width="737" height="216" alt="image"
src="https://github.com/user-attachments/assets/73e4e8cb-7c03-440e-8f36-a7431b0ea051"
/>
Was due to the `enabled` value being default to `true` in the
`useEffect`
## To test
- Just verify that the enable toggle in the panel matches the auth
hook's enabled state1 parent 81415c6 commit efdf6d1
1 file changed
Lines changed: 9 additions & 9 deletions
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 2 | | |
9 | 3 | | |
10 | 4 | | |
| |||
16 | 10 | | |
17 | 11 | | |
18 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
0 commit comments