Comment out the dashboard page
This commit is contained in:
parent
4a44e53867
commit
eaedc8b594
1 changed files with 28 additions and 28 deletions
|
|
@ -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
|
||||
// }
|
||||
|
|
|
|||
Loading…
Reference in a new issue