Comment out the dashboard page

This commit is contained in:
Saurabh Misra 2023-12-17 21:32:54 -08:00
parent 4a44e53867
commit eaedc8b594

View file

@ -1,28 +1,28 @@
import React, { type JSX } from "react"
export default async function DashboardPage(): Promise<JSX.Element> {
const repos = await getData()
return (
<div className="mx-32">
x<h1>Repositories</h1>
<ul>
{repos.map((repo: any) => (
<li key={repo.id}>{repo.full_name}</li>
))}
</ul>
</div>
)
}
async function getData(): Promise<any> {
let repos = []
try {
// TODO need to authenticate this request, possibly with auth0 m2m token
const response = await fetch("http://localhost:3001/cfapi/installed_repositories")
repos = await response.json()
} catch (error) {
console.error("Error fetching repositories:", error)
}
return repos
}
// import React, { type JSX } from "react"
//
// export default async function DashboardPage(): Promise<JSX.Element> {
// const repos = await getData()
//
// return (
// <div className="mx-32">
// x<h1>Repositories</h1>
// <ul>
// {repos.map((repo: any) => (
// <li key={repo.id}>{repo.full_name}</li>
// ))}
// </ul>
// </div>
// )
// }
//
// async function getData(): Promise<any> {
// let repos = []
// try {
// // TODO need to authenticate this request, possibly with auth0 m2m token
// const response = await fetch("http://localhost:3001/cfapi/installed_repositories")
// repos = await response.json()
// } catch (error) {
// console.error("Error fetching repositories:", error)
// }
// return repos
// }