feat: add reviews, notifications, notes and account hardening
All checks were successful
CI / Validate frontend and API (push) Successful in 59s
CI / Build and publish Docker images (push) Successful in 23s

This commit is contained in:
Cauê Faleiros
2026-11-05 17:27:36 -03:00
parent 21085e887d
commit fff63f5efa
32 changed files with 1109 additions and 84 deletions

View File

@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { authApi, saveSession } from '../services/api';
import { paths } from '../lib/routes';
export const AccessTokenPage: React.FC<{ mode: 'invite' | 'reset' }> = ({ mode }) => {
const location = useLocation();
@@ -19,7 +20,7 @@ export const AccessTokenPage: React.FC<{ mode: 'invite' | 'reset' }> = ({ mode }
if (mode === 'invite') {
const session = await authApi.acceptInvitation(token, name, password);
saveSession(session); navigate(session.user.role === 'admin' ? '/admin' : session.user.role === 'instructor' ? '/gerenciar' : '/');
} else { await authApi.resetPassword(token, password); navigate('/'); }
} else { await authApi.resetPassword(token, password); navigate(paths.signIn, { replace: true }); }
} catch { setError('Este link é inválido, expirou ou não pôde ser usado.'); }
finally { setSaving(false); }
};