From 6495f6072ac744a4f0e9113380d1d4644c07f086 Mon Sep 17 00:00:00 2001 From: Carsten Kragelund Date: Sat, 5 Aug 2023 20:21:45 +0200 Subject: [PATCH] skull: hammy moment --- app/page.tsx | 123 +++++++-------------------------------------------- 1 file changed, 16 insertions(+), 107 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 7a8286b..5f4dbf0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,113 +1,22 @@ -import Image from 'next/image' +export default async function Home() { + const response = await fetch("https://api.github.com/user/repos", { + headers: { + Accept: "application/vnd.github+json", + Authorization: `Bearer ${process.env.REPOS_READ_ONLY}`, + "X-GitHub-Api-Version": "2022-11-28", + }, + cache: "force-cache", + }); + const data = (await response.json()) as any[]; + console.log(data); -export default function Home() { return ( -
-
-

- Get started by editing  - app/page.tsx +

+
+

+ {data.toString()}

- -
- -
- Next.js Logo -
- -
- -

- Docs{' '} - - -> - -

-

- Find in-depth information about Next.js features and API. -

-
- - -

- Learn{' '} - - -> - -

-

- Learn about Next.js in an interactive course with quizzes! -

-
- - -

- Templates{' '} - - -> - -

-

- Explore the Next.js 13 playground. -

-
- - -

- Deploy{' '} - - -> - -

-

- Instantly deploy your Next.js site to a shareable URL with Vercel. -

-
- ) + ); }