This commit is contained in:
tuna2134
2025-04-29 03:52:16 +00:00
parent 65ba0bd083
commit 2627d4456d
2 changed files with 25 additions and 5 deletions

View File

@@ -1,8 +1,21 @@
const Header: React.FC = () => { import Image from "next/image";
const Header: React.FC = async () => {
const res = await fetch(
"https://discord.com/api/v10/users/739702692393517076",
{
headers: {
Authorization: `Bot ${process.env.DISCORD_TOKEN}`,
}
}
);
const data = await res.json();
const avatarURL = `https://cdn.discordapp.com/avatars/739702692393517076/${data.avatar}.png?size=1024`
return ( return (
<header className="h-screen w-screen flex place-content-center"> <header className="h-screen w-screen flex justify-center items-center">
<div className="place-content-center"> <div>
<h1 className="text-2xl font-bold">tuna2134</h1> <Image alt="avatar" src={avatarURL} width={156} height={156} className="mb-2 rounded-full" />
<h1 className="text-2xl font-bold text-center">tuna2134</h1>
</div> </div>
</header> </header>
) )

View File

@@ -1,7 +1,14 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
/* config options here */ images: {
remotePatterns: [
{
protocol: 'https',
hostname: "cdn.discordapp.com",
}
]
}
}; };
export default nextConfig; export default nextConfig;