-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend refactoring pt.1 #373
Conversation
frontend/src/Pages/MyProgress.tsx
Outdated
return ( | ||
<tr | ||
className="flex flex-row justify-between body-small items-center" | ||
key={Math.random()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have included this in the ticket, but we also need to remove all the instances of Math.random() when used as keys. This changes on each render and causes huge perf issues. Try to use the id
field of whatever the item is, and if it doesn't exist, it likely has one that just wasn't added to the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be the Outcome (certificate) that would need the ID in this particular instance.
but if there is one where you cannot use an ID, then use the index of the array you are calling map
on
refactor: remove any types and math.random as keys
9de9ffc
to
fe9b79e
Compare
Description of the change
Refactor of the any types in the frontend directory
Closes: #369
Screenshot(s)
N/A
Additional context
N/A