fix(grid-lite): changing random data gen to use built-in avatars#3864
fix(grid-lite): changing random data gen to use built-in avatars#3864
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the random data generation service to use built-in avatar assets instead of external URLs, and implements gender-based avatar selection.
- Split the single
firstNamesarray into separatemaleFirstNamesandfemaleFirstNamesarrays - Added a
randomFirstName()method that returns both a name and corresponding gender - Updated avatar URLs from external pravatar.cc service to local asset paths
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| age: this.randomInt(18, 90), | ||
| email, | ||
| avatar: `https://i.pravatar.cc/150?img=${this.randomInt(1, 70)}`, | ||
| avatar: `assets/images/${gender}/${this.randomInt(1, 70)}.jpg`, |
There was a problem hiding this comment.
The avatar path generates random image numbers from 1 to 70, but there's no guarantee that all 70 images exist in the assets for both genders. This could result in broken image references. Consider defining the actual available image ranges for each gender or validating that the images exist.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.