You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getStaticPaths function in the campaign page route handler was updated to dynamically fetch campaigns from an external API during build time. Previously it returned empty paths; now it parses the API response, maps campaigns to route parameters using their on_chain_id, and includes comprehensive error handling.
Updated getStaticPaths to fetch campaigns from API, parse payload flexibly (supporting both results and data fields), map campaigns to path params, and handle errors with fallback to blocking mode
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Revert everything to pre-generation #535: Also implements dynamic getStaticPaths in the campaign page by fetching campaigns and mapping on_chain_id to route parameters.
Removed everything ssr for now #543: Modifies the same getStaticPaths implementation, removing it entirely in favor of a different approach.
Revert from SSR and improvements #530: Previously introduced an empty-paths fallback pattern in the same function that this PR now replaces with dynamic campaign fetching.
Poem
🐰 Static paths were once so bare and bare,
Now campaigns dance through API air,
With on_chain_id mapped to routes,
Error-handled, with blocking shoots,
Dynamic generation blooms so fair! ✨
✨ Finishing touches
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.