Describe the bug
Users might get the warning, "Encountered two children with the same key on the Lesson Page." This is because there are duplicate key props of the StyledCard component on the Lesson page.
This is what the key prop currently is. It is possible for name and body to be the same for two different cards
key={${element.name}${element.body}}
We should change which value is being passed into the key prop for the StyledCard component and make sure that it will remain unique, even if two vocab items have the same name and description.
To fix this bug, update the two key props in client/src/components/LanguageHome by including element._id.
Describe the bug Users might get the warning, "Encountered two children with the same key on the Lesson Page." This is because there are duplicate key props of the
StyledCard
component on the Lesson page.We should change which value is being passed into the
key
prop for theStyledCard
component and make sure that it will remain unique, even if two vocab items have the same name and description.To fix this bug, update the two key props in client/src/components/LanguageHome by including
element._id
.