Skip to content

Commit

Permalink
Merge pull request #85 from Rushikesh-Sonawane99/shiksha-2.0
Browse files Browse the repository at this point in the history
#Issue PS-286 chore: Fixed loader issue and added cohortId to get cohort member list dynamically
  • Loading branch information
itsvick authored May 8, 2024
2 parents 0e554f7 + 56723b9 commit 23fd514
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ const Dashboard: React.FC<DashboardProps> = () => {
const parentCohortId = localStorage.getItem('parentCohortId');
const formattedDate: string = currentDate;
try {
if (userId && classId && parentCohortId) {
if (userId && classId && parentCohortId) {
let limit = "100";
let page = 0;
let filters = { cohortId: "2e09f3b6-e571-476e-a536-e1bf3a061e46" }; //Hard coded for testing replace it with classId
let filters = { cohortId: classId }; //Hard coded for testing replace it with classId
const response = await getMyCohortMemberList({
limit ,
page,
Expand Down Expand Up @@ -196,7 +196,9 @@ const Dashboard: React.FC<DashboardProps> = () => {
} catch (error) {
console.error('Error fetching cohort list:', error);
setLoading(false);
}
}finally {
setLoading(false);
}
};

if (classId.length) {
Expand Down

0 comments on commit 23fd514

Please sign in to comment.