Skip to content

Commit

Permalink
Merge pull request #99 from Rushikesh-Sonawane99/shiksha-2.0
Browse files Browse the repository at this point in the history
Issue #000 chore: Added dynamic userId on Dashboard
  • Loading branch information
itsvick authored May 10, 2024
2 parents 28a0254 + b274530 commit 923c8bc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ const Dashboard: React.FC<DashboardProps> = () => {
//API call to get center list
useEffect(() => {
const fetchCohortList = async () => {
// const userId = localStorage.getItem('userId');
const userId = '6d58d9c3-863f-484b-a81a-76901e9a6c9e'; //Hard Coded for testing purpose. TODO: replace by dynamic userId
const userId = localStorage.getItem('userId');
// const userId = '6d58d9c3-863f-484b-a81a-76901e9a6c9e'; //Hard Coded for testing purpose. TODO: replace by dynamic userId
setLoading(true);
try {
if (userId) {
Expand Down Expand Up @@ -195,7 +195,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
//userId && parentCohortId
let limit = 100;
let page = 0;
let filters = { cohortId: classId }; //Hard coded for testing replace it with classId
let filters = { cohortId: classId };
const response = await getMyCohortMemberList({
limit,
page,
Expand Down Expand Up @@ -504,7 +504,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
};

useEffect(() => {
let userId = '70861cf2-d00c-475a-a909-d58d0062c880'; //Hard coded for testing purpose: TODO: Remove it later and add dynamic userId
let userId = localStorage.getItem('userId'); //Hard coded for testing purpose: TODO: Remove it later and add dynamic userId
//setContextId('17a82258-8b11-4c71-8b93-b0cac11826e3') // this one is for testing purpose
const fetchUserDetails = async () => {
try {
Expand Down

0 comments on commit 923c8bc

Please sign in to comment.