mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-12-22 13:51:04 +01:00
feat: guild info
This commit is contained in:
parent
19df67079a
commit
e285c47e01
2 changed files with 39 additions and 1 deletions
25
apps/website/src/components/dashboard/GuildInfo.astro
Normal file
25
apps/website/src/components/dashboard/GuildInfo.astro
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
const { id, name, icon } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="flex items-center justify-center">
|
||||
<Image
|
||||
src={`https://cdn.discordapp.com/icons/${id}/${icon}.webp`}
|
||||
class="mr-5 rounded-full"
|
||||
alt="icon"
|
||||
width={64}
|
||||
height={64}
|
||||
/>
|
||||
|
||||
<h1 class="break-all py-12 text-5xl font-extrabold text-white">
|
||||
{name}
|
||||
</h1>
|
||||
</div>
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
import GuildInfo from "~/components/dashboard/GuildInfo.astro";
|
||||
import UserInfo from "~/components/dashboard/UserInfo.astro";
|
||||
import Layout from "~/layouts/Layout.astro";
|
||||
import { getGuild } from "~/lib/guilds";
|
||||
import { isUserEligible } from "~/lib/user";
|
||||
|
||||
|
@ -20,4 +23,14 @@ if (!eligible) {
|
|||
}
|
||||
---
|
||||
|
||||
You can manage guild {guild.name} with id {guild.id}
|
||||
<Layout>
|
||||
<div class="flex flex-col items-center justify-center md:flex-row">
|
||||
<UserInfo />
|
||||
|
||||
<p class="px-6 text-5xl text-white">on</p>
|
||||
|
||||
<GuildInfo id={guild.id} name={guild.name} icon={guild.icon} />
|
||||
</div>
|
||||
|
||||
You can manage guild {guild.name} with id {guild.id}
|
||||
</Layout>
|
||||
|
|
Loading…
Reference in a new issue