fix: add type annotation for data in GitHubStarsButton component
This commit is contained in:
parent
fd4426ddd7
commit
8a5a49f041
@ -100,7 +100,7 @@ function GitHubStarsButton({
|
||||
React.useEffect(() => {
|
||||
fetch(`https://api.github.com/repos/${username}/${repo}`)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
.then((data: any) => {
|
||||
if (data && typeof data.stargazers_count === 'number') {
|
||||
setStars(data.stargazers_count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user