Skip to content

Conversation

@poteto
Copy link
Member

@poteto poteto commented Sep 3, 2025

The previous examples used a service called loremflickr.com to link to placeholder images. Since that service is now down, I updated them to reference placecats.com instead, which we already use in other examples as well. placecats doesn't have the same random cat feature so I roughly approximated it in the example code.

Closes #7966

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

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

LGTM just a note on the key

for (let i = 0; i < 10; i++) {
catList.push("https://loremflickr.com/320/240/cat?lock=" + i);
if (i < 5) {
catList.push("https://placecats.com/neo/320/240");
Copy link
Member

Choose a reason for hiding this comment

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

We probably shouldn't break the key in the example. Instead, this can push an object like {id: 1, src: 'https://...'}, or you could add an index param to the URL like in the previous version (like https://placecats.com/neo/320/240?id=1).

Copy link
Member

Choose a reason for hiding this comment

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

Looks like we do both options in other examples

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I noticed we were implicitly relying on the index previously so I thought to just keep it instead of fixing it. But you're right, let me fix that too

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed to use an object with an id!

The previous examples used a service called loremflickr.com to link to  placeholder images. Since that service is now down, I updated them to reference placecats.com instead, which we already use in other examples as well. placecats doesn't have the same random cat feature so I roughly approximated it in the example code.

Closes #7966
@poteto poteto merged commit 85ee6b2 into main Sep 3, 2025
10 checks passed
@poteto poteto deleted the pr7968 branch September 3, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: photos in ref section of the tutorial are down (again)

2 participants