Skip to content

Commit

Permalink
works
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinayak Fialok authored and Vinayak Fialok committed Sep 4, 2023
1 parent 54b7a69 commit 5c3b9d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 9 additions & 6 deletions frontend/src/pages/ProgressionChecker/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@ const Dashboard = ({ isLoading, structure, totalUOC, freeElectivesUOC }: Props)

const [userQuery, degreesQuery, coursesQuery] = useQueries([
{
queryKey: ['user'],
queryFn: getUser
queryKey: 'user',
queryFn: getUser,
refetchOnWindowFocus: false
},
{
queryKey: ['allPrograms'],
queryFn: getAllDegrees
queryKey: 'allPrograms',
queryFn: getAllDegrees,
refetchOnWindowFocus: false
},
{
queryKey: ['courses'],
queryFn: getCoursesInfo
queryKey: 'courses',
queryFn: getCoursesInfo,
refetchOnWindowFocus: false
}
]);

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/pages/ProgressionChecker/ProgressionChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ const ProgressionChecker = () => {
});
});

const coursesQuery = useQuery('plannerCourses', getCoursesInfo);
const coursesQuery = useQuery('plannerCourses', getCoursesInfo, {
refetchOnWindowFocus: false
});
const courses = coursesQuery.data ?? {};

const countedCourses: string[] = [];
Expand Down

0 comments on commit 5c3b9d6

Please sign in to comment.