File tree 1 file changed +0
-29
lines changed
1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -4,39 +4,10 @@ import { ChatbotUISVG } from "@/components/icons/chatbotui-svg"
4
4
import { IconArrowRight } from "@tabler/icons-react"
5
5
import { useTheme } from "next-themes"
6
6
import Link from "next/link"
7
- import { useEffect , useState } from "react"
8
7
9
8
export default function HomePage ( ) {
10
9
const { theme } = useTheme ( )
11
10
12
- const [ stars , setStars ] = useState ( 19000 )
13
-
14
- useEffect ( ( ) => {
15
- getGitHubRepoStars ( )
16
- } , [ ] )
17
-
18
- const getGitHubRepoStars = async ( ) => {
19
- const url = `https://api.github.com/repos/mckaywrigley/chatbot-ui`
20
-
21
- try {
22
- const response = await fetch ( url , {
23
- headers : {
24
- Accept : "application/vnd.github.v3+json"
25
- }
26
- } )
27
-
28
- if ( ! response . ok ) {
29
- throw new Error ( `Error: ${ response . status } ` )
30
- }
31
-
32
- const data = await response . json ( )
33
- setStars ( data . stargazers_count )
34
- } catch ( error ) {
35
- console . error ( "Failed to fetch GitHub stars:" , error )
36
- return 0
37
- }
38
- }
39
-
40
11
return (
41
12
< div className = "flex h-screen w-screen flex-col items-center justify-center" >
42
13
< div >
You can’t perform that action at this time.
0 commit comments