Commit a6e556e
committed
fix(frontend): hide SelfCareAiSection for anonymous users
/self-care e' una pagina pubblica, ma SelfCareAiSection montava useAiContext che chiama GET /api/ai/status ([Authorize]). Per utenti non autenticati il 401 faceva scattare l'interceptor axios -> redirect forzato a /login, rompendo i test e2e public-pages e a11y. Ora la sezione AI viene renderizzata solo dopo che AuthContext conferma un utente loggato.1 parent 4b48218 commit a6e556e
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
8 | 19 | | |
9 | 20 | | |
10 | 21 | | |
| |||
0 commit comments