Skip to content
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

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jun 9, 2024

@oliviertassinari oliviertassinari requested a review from zanivan June 9, 2024 22:04
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work docs Improvements or additions to the documentation labels Jun 9, 2024
@mui-bot
Copy link

mui-bot commented Jun 9, 2024

Netlify deploy preview

https://deploy-preview-42594--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 5ffb390

<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}>
Copy link
Contributor

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?

Suggested change
<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}>

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@zanivan zanivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks 👍

@oliviertassinari oliviertassinari merged commit 5149a65 into mui:next Jun 10, 2024
20 of 21 checks passed
@oliviertassinari oliviertassinari deleted the fix-console-error branch June 10, 2024 15:00
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Jun 12, 2024
joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants