Add goals feature for personal goals with filters

This commit is contained in:
Gregor Vostrak
2026-10-02 12:59:44 +02:00
parent 349623d537
commit f9519d0d5a
83 changed files with 7702 additions and 105 deletions

View File

@@ -14,7 +14,7 @@ export async function fetchAllMembers(organizationId: string): Promise<Member[]>
);
}
export function useMembersQuery() {
export function useMembersQuery(options: { enabled?: () => boolean } = {}) {
const queryClient = useQueryClient();
const query = useQuery({
@@ -25,7 +25,7 @@ export function useMembersQuery() {
const data = await fetchAllMembers(organizationId);
return { data };
},
enabled: () => !!getCurrentOrganizationId(),
enabled: () => !!getCurrentOrganizationId() && (options.enabled?.() ?? true),
staleTime: 1000 * 30, // 30 seconds
});