Skip to content

Commit d3cf8b2

Browse files
committed
remove old code
1 parent 2856806 commit d3cf8b2

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

app/page.tsx

-29
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,10 @@ import { ChatbotUISVG } from "@/components/icons/chatbotui-svg"
44
import { IconArrowRight } from "@tabler/icons-react"
55
import { useTheme } from "next-themes"
66
import Link from "next/link"
7-
import { useEffect, useState } from "react"
87

98
export default function HomePage() {
109
const { theme } = useTheme()
1110

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-
4011
return (
4112
<div className="flex h-screen w-screen flex-col items-center justify-center">
4213
<div>

0 commit comments

Comments
 (0)