MCPcopy Create free account
hub / github.com/codingforentrepreneurs/jref.io / GithubProfile

Function GithubProfile

src/app/github/page.js:7–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5const fetcher = (url) => fetch(url).then((res)=>res.json());
6
7export default function GithubProfile() {
8 const myGithubRepoProfile = "https://api.github.com/repos/codingforentrepreneurs/jref.io"
9 const {data, error, isLoading} = useSWR(myGithubRepoProfile, fetcher)
10 if (error) return "An error happened"
11 if (isLoading) return "Loading..."
12 return (
13 <div>
14 <h1>{data.name}</h1>
15 <p>{data.description}</p>
16 <strong>👁 {data.subscribers_count}</strong>{" "}
17 <strong>✨ {data.stargazers_count}</strong>{" "}
18 <strong>🍴 {data.forks_count}</strong>
19 </div>
20 )
21
22
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected