Live Github Star Count + Connection Count#2391
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| fallback: { | ||
| starCount: pageProps.starCount, | ||
| }, |
There was a problem hiding this comment.
Might be cool to just spread pageProps here, then any return from getServerSideProps on any page will automatically populate the swr cache for each key.
But leaving explicit for now for clarity in the PR.
| ); | ||
| } | ||
|
|
||
| export const getStaticProps: GetStaticProps = async () => { |
There was a problem hiding this comment.
anyone who visits the landing page will get a fresh value for the github star count immediately thats no more than one hour old.
|
View Vercel preview at instant-www-js-drewh-star-count-jsv.vercel.app. |
795de4a to
4edc96b
Compare
f81c977 to
57cea54
Compare
BACKEND SETUP:
Set
GITHUB_PERSONAL_ACCESS_TOKEN(will still use public auth if unset)