analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
32 lines • 1.08 kB
TypeScript
import type { BaseApiClient } from '../../types/api';
import type { UseUserAccessDataReturn, UseStudentsFilterReturn } from './types';
/**
* Hook to fetch user access data (schools, schoolYears, classes)
*
* Receives the api client and calls /auth/me endpoint directly.
*
* @example
* ```tsx
* const { schools, schoolYears, classes, isLoading, error } = useUserAccessData(api);
* ```
*/
export declare function useUserAccessData(api: BaseApiClient): UseUserAccessDataReturn;
/**
* Hook to fetch and manage students for filtering
*
* Receives the api client and calls /students/filters endpoint directly.
*
* @example
* ```tsx
* const { groupedStudents, isLoading, fetchStudents, clearStudents } = useStudentsFilter(api);
*
* // Fetch students when filters change
* useEffect(() => {
* if (schoolIds.length > 0) {
* fetchStudents({ schoolIds, schoolYearIds, classIds });
* }
* }, [schoolIds, schoolYearIds, classIds]);
* ```
*/
export declare function useStudentsFilter(api: BaseApiClient): UseStudentsFilterReturn;
//# sourceMappingURL=hooks.d.ts.map