Skip to content

Show latest post in landing page#131

Merged
arjunkomath merged 1 commit intodevelopfrom
docs/sdks
Dec 21, 2025
Merged

Show latest post in landing page#131
arjunkomath merged 1 commit intodevelopfrom
docs/sdks

Conversation

@arjunkomath
Copy link
Copy Markdown
Member

@arjunkomath arjunkomath commented Dec 21, 2025

Summary by CodeRabbit

  • New Features
    • The homepage hero section's "What's new" display now dynamically showcases your latest published update, replacing the static version label with your most recent announcement. This ensures your homepage remains current and prominently features your latest news, keeping visitors informed at a glance.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
changes-page Building Building Preview Dec 21, 2025 4:25am
2 Skipped Deployments
Project Deployment Review Updated (UTC)
changes-page-docs Skipped Skipped Dec 21, 2025 4:25am
user-changes-page Skipped Skipped Dec 21, 2025 4:25am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The Hero component now accepts a latestPost prop to display the latest post title. The index page's getStaticProps function fetches data from Stripe, GitHub, and ChangesPage APIs at build time, passing the latest post to Hero for dynamic "What's new" rendering.

Changes

Cohort / File(s) Summary
Hero component prop enhancement
apps/web/components/marketing/hero.tsx
Added latestPost: Post | null prop; imported Post type from @changespage/react; updated "What's new" label logic to display latestPost.title when available, otherwise falls back to version string.
Index page server-side data fetching
apps/web/pages/index.tsx
Introduced getStaticProps to orchestrate fetching from multiple sources (Stripe, GitHub, ChangesPage); added getGitHubStars helper function; created ChangesPage client to fetch latest post; updated Index component signature with InferGetStaticPropsType<typeof getStaticProps> and passed latestPost to Hero component; added necessary imports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • getStaticProps implementation: Verify all API calls are properly awaited and error cases are handled; check Stripe, GitHub, and ChangesPage API integration
  • Type safety: Confirm InferGetStaticPropsType usage is correct and all props are properly typed through the data flow
  • Conditional rendering: Review fallback logic in Hero when latestPost is null; ensure Post type structure matches API response

Possibly related PRs

  • Add docs for SDK #129: Introduces runtime usage of the ChangesPage SDK (createChangesPageClient and Post type) directly utilized in this PR for fetching latest post data.

Poem

🐰 A whisker-twitching tale of builds so fine,
Static props now fetch and align,
From Stripe to GitHub, ChangesPage too—
Fresh posts hopping into Hero's view! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/sdks

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d847347 and 8efb6a2.

📒 Files selected for processing (2)
  • apps/web/components/marketing/hero.tsx (2 hunks)
  • apps/web/pages/index.tsx (2 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@arjunkomath arjunkomath merged commit 736a6db into develop Dec 21, 2025
4 of 6 checks passed
@arjunkomath arjunkomath deleted the docs/sdks branch December 21, 2025 04:26
@coderabbitai coderabbitai bot mentioned this pull request Mar 26, 2026
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.

1 participant