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