feat: implement real user login state and fix profile view
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m12s

This commit is contained in:
Cauê Faleiros
2026-02-25 11:59:53 -03:00
parent a175315437
commit 9f047ece86
6 changed files with 68 additions and 40 deletions

View File

@@ -20,11 +20,12 @@ export const UserDetail: React.FC = () => {
const loadData = async () => {
try {
const tenantId = localStorage.getItem('ctms_tenant_id') || CURRENT_TENANT_ID;
const u = await getUserById(id);
setUser(u);
if (u) {
const data = await getAttendances(CURRENT_TENANT_ID, {
const data = await getAttendances(tenantId, {
userId: id,
dateRange: { start: new Date(0), end: new Date() } // All time
});