()
| 198 | useEffect(() => { |
| 199 | if (isCloud || isOpenSource) { |
| 200 | const fetchStarCount = async () => { |
| 201 | try { |
| 202 | const response = await fetch('https://api.github.com/repos/FlowiseAI/Flowise') |
| 203 | const data = await response.json() |
| 204 | if (data.stargazers_count) { |
| 205 | setStarCount(data.stargazers_count) |
| 206 | } |
| 207 | } catch (error) { |
| 208 | setStarCount(0) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | fetchStarCount() |
| 213 | } |