-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs] Fix dashboard template console error #42594
Conversation
Netlify deploy previewhttps://deploy-preview-42594--material-ui.netlify.app/ Bundle size report |
<Grid container spacing={2} columns={12}> | ||
{data.map((card, index) => ( | ||
<Grid xs={6} sm={3} md={2} lg={2.25}> | ||
<StatCard key={index} {...card} /> | ||
<Grid key={index} xs={6} sm={3} md={2} lg={2.25}> |
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.
What do you think about this diff instead?
<Grid key={index} xs={6} sm={3} md={2} lg={2.25}> | |
<Grid key={card.title} xs={6} sm={3} md={2} lg={2.25}> |
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 could see the same title with different time ranges: https://deploy-preview-42594--material-ui.netlify.app/material-ui/getting-started/templates/dashboard/. I don't think it matters here that it uses the array index. It will be more flexible for people.
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.
Ah okay, was just commenting based on data
in this file.
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.
Good catch! Thanks 👍
https://deploy-preview-42594--material-ui.netlify.app/material-ui/getting-started/templates/dashboard/