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

feat: use generateStaticParams to pregenerate some routes #1886

Closed
wants to merge 1 commit into from

Conversation

jorgemoya
Copy link
Contributor

What/Why?

Testing

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview Jan 15, 2025 4:42pm
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 4:42pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jan 15, 2025 4:42pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jan 15, 2025 4:42pm
catalyst-soul ⬜️ Ignored (Inspect) Visit Preview Jan 15, 2025 4:42pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jan 15, 2025 4:42pm

const brands = await getBrands();

return routing.locales.map((locale) => {
return removeEdgesAndNodes(brands).map((brand) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

This is something I have been thinking about recently when migrating the account pages. I think we should probably have the pattern of removing the edges and nodes closer to the boundary, in this case inside getBrands. This way consumers don't need to worry about it and can focus on just massaging a normalized payload into what is needed for the page.

@jorgemoya jorgemoya changed the title feat: use generateStaticParams to pregenerate some routes feat: use generateStaticParams to pre generate some routes Jan 10, 2025
@jorgemoya jorgemoya changed the title feat: use generateStaticParams to pre generate some routes feat: use generateStaticParams to pregenerate some routes Jan 10, 2025
@jorgemoya jorgemoya force-pushed the static-ppr-experiment branch from ced9e8b to 41aea38 Compare January 10, 2025 16:23
Copy link

changeset-bot bot commented Jan 10, 2025

⚠️ No Changeset found

Latest commit: 34ecbcc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jorgemoya
Copy link
Contributor Author

Closing PR because it is not providing value as expected.

@jorgemoya jorgemoya closed this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants