petercat-ai / petercat

A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://petercat.ai
MIT License
605 stars 18 forks source link

fix: solve the stars number #380

Closed xingwanying closed 2 months ago

xingwanying commented 2 months ago

Fetch Data in a Server Component

vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 2:51pm
petercat-assistant[bot] commented 2 months ago

Walkthrough

This PR refactors the way GitHub stars are fetched and displayed by moving the fetching logic to a server component. This change ensures that the star count is always up-to-date and simplifies the client-side code.

Changes

File Summary
client/app/page.tsx Refactored to remove client-side fetching of GitHub stars and utilize the new GitHubStars component.
client/components/GitHubStars.tsx New component to fetch and display GitHub stars on the server side.
client/components/LangSwitcher.tsx Minor adjustment to language options formatting.