Click here to Skip to main content
15,886,693 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys, I have a bug where the value from user A is being displayed in the user B dashboard.

Here is the code where that displays the values:

<div className="text--black align-items-center med_text_summary">
                  Current Week : {totalEffort.toPrecision(1)} / {weeklyComittedHours}
                  <Progress
                    value={getBarValue(totalEffort)}
                    className={getBarColor(totalEffort)}
                    striped={totalEffort < weeklyComittedHours}
                  />
                </div>


What I have tried:

I have tried to change the toFixed() but unfortunately, I didn't get much from it
Posted
Comments
Chris Copeland 28-Oct-22 14:42pm    
There's not nearly enough information in this question to help. If the totalEffort value is incorrect then the issue is with where this value is being pulled from, not the HTML code itself. You haven't provided that part of the code so we're not able to help.
Dave Kreskowiak 28-Oct-22 18:04pm    
You would usually have some unique identifier for each user when they login to your site. Whatever data you're storing has to be associated with the user that created it, by each users ID value.

Whenever you retrieve data to be displayed, you have to supply the users ID value to get the data associated with that user.

Other than that, there's really nothing anyone can tell you about what you did wrong because the code you supplied is incomplete. What you did supply doesn't have anything obvious that associates data to individual users.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900