Skip to content

Commit

Permalink
update cache keys in useQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
SimNed committed May 28, 2024
1 parent 257b4c8 commit 0a11a57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/api/statistics/statistics.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function getContributions(): Promise<ContributionStats[]> {
}

export const useGetContributions = () => {
return useQuery(['activities'], () => getContributions());
return useQuery(['contributions'], () => getContributions());
};

async function getClassroomExchanges(): Promise<ClassroomExchangesStats> {
Expand All @@ -34,7 +34,7 @@ async function getClassroomExchanges(): Promise<ClassroomExchangesStats> {
}

export const useGetClassroomExchanges = () => {
return useQuery(['activities', 'comments'], () => getClassroomExchanges());
return useQuery(['classroom_exchanges'], () => getClassroomExchanges());
};

async function getStudentAccounts(): Promise<StudentAccountsStats> {
Expand All @@ -48,7 +48,7 @@ async function getStudentAccounts(): Promise<StudentAccountsStats> {
}

export const useGetStudentAccounts = () => {
return useQuery(['student'], () => getStudentAccounts());
return useQuery(['student_accounts'], () => getStudentAccounts());
};

async function getConnectionTimes(): Promise<ConnectionTimesStats> {
Expand All @@ -62,7 +62,7 @@ async function getConnectionTimes(): Promise<ConnectionTimesStats> {
}

export const useGetConnectionTimes = () => {
return useQuery(['analytic_sesssion'], () => getConnectionTimes());
return useQuery(['connection_times'], () => getConnectionTimes());
};

async function getConnectionCounts(): Promise<ConnectionCountsStats> {
Expand All @@ -76,5 +76,5 @@ async function getConnectionCounts(): Promise<ConnectionCountsStats> {
}

export const useGetConnectionCounts = () => {
return useQuery(['analytic_sesssion'], () => getConnectionCounts());
return useQuery(['connection_counts'], () => getConnectionCounts());
};

0 comments on commit 0a11a57

Please sign in to comment.