(currentCount)
| 33 | } |
| 34 | |
| 35 | export async function fetchStarCount(currentCount) { |
| 36 | const resp = await fetch('https://api.github.com/repos/electric-sql/pglite') |
| 37 | |
| 38 | if (resp.ok) { |
| 39 | const data = await resp.json() |
| 40 | |
| 41 | return data.stargazers_count |
| 42 | } |
| 43 | |
| 44 | return currentCount || FALLBACK_INITIAL_COUNT |
| 45 | } |