File tree Expand file tree Collapse file tree
components/shared/GhStarBtn Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,22 +6,21 @@ import { FaStar } from "react-icons/fa";
66import axios from "axios" ;
77
88
9- const GhStarBtn = async ( ) => {
10- const [ starCount , setStarCount ] = useState ( '--' ) ;
9+ const GhStarBtn = ( ) => {
10+ const [ stargazers_count , setStargazers_count ] = useState ( '--' ) ;
1111
1212 useEffect ( ( ) => {
13- axios . get ( "https://api.github.com/repos/devxprite/infoooze " )
14- . then ( res => { setStarCount ( res . data . stargazers_count ) } )
13+ axios . get ( "https://api.github.com/repos/devxprite/searchex " )
14+ . then ( res => { setStargazers_count ( res . data . stargazers_count || '--' ) ; } )
1515 . catch ( err => { console . log ( err ) ; } )
1616 } , [ ] ) ;
17-
1817
1918 return (
2019 < a href = "https://github.com/devxprite/searchex" target = "_blank" className = { styles . ghStarBtn } >
2120 < span >
2221 < FaStar /> Star Us
2322 </ span >
24- < span > { starCount } </ span >
23+ < span > { stargazers_count } </ span >
2524 </ a >
2625 ) ;
2726}
Original file line number Diff line number Diff line change 1313 "axios" : " ^1.4.0" ,
1414 "lodash" : " ^4.17.21" ,
1515 "mongodb" : " ^5.0.1" ,
16- "next" : " 13.4.3 " ,
16+ "next" : " ^ 13.4.7 " ,
1717 "next-auth" : " ^4.22.1" ,
1818 "react" : " 18.2.0" ,
1919 "react-autosuggest" : " ^10.1.0" ,
You can’t perform that action at this time.
0 commit comments