Skip to content

Commit

Permalink
Fixed djangoindia#244 -- Created apiDataCard.ts, configured DataCard …
Browse files Browse the repository at this point in the history
…count numbers for fetching actual data - Subscribers, Contributors, Stars
  • Loading branch information
ehemp committed Dec 9, 2024
1 parent 2ecde32 commit fd80817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/DataCard/DataCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DataCard = () => {
const [dataCount, setDataCount] = useState({});
const [loading, setLoading] = useState(true);
useEffect(() => {
async function fetchStargazerCount(url1: string, url2: string, options: object): Promise<any> {
async function fetchDataCount(url1: string, url2: string, options: object): Promise<any> {
try {
if (url1 && url2) {
let res = await fetch(url1, options);
Expand All @@ -38,7 +38,7 @@ export const DataCard = () => {
}
}
if (loading){
fetchStargazerCount(url.stargazers_subs_count, url.contributors, requestOptions.options);
fetchDataCount(url.stargazers_subs_count, url.contributors, requestOptions.options);
}

},[])
Expand Down

0 comments on commit fd80817

Please sign in to comment.