diff --git a/apps/website/src/components/Container.astro b/apps/website/src/components/Container.astro new file mode 100644 index 0000000..21ead53 --- /dev/null +++ b/apps/website/src/components/Container.astro @@ -0,0 +1,7 @@ +--- +const { class: className } = Astro.props; +--- + +
+ +
diff --git a/apps/website/src/env.d.ts b/apps/website/src/env.d.ts index 2fe3396..320a19a 100644 --- a/apps/website/src/env.d.ts +++ b/apps/website/src/env.d.ts @@ -4,6 +4,8 @@ import type { User as AuthCoreUser } from "@auth/core/types"; export type User = AuthCoreUser & { guilds: { + id: string; name: string; + icon: string; }[]; }; diff --git a/apps/website/src/pages/dashboard/index.astro b/apps/website/src/pages/dashboard/index.astro index a80f808..252269a 100644 --- a/apps/website/src/pages/dashboard/index.astro +++ b/apps/website/src/pages/dashboard/index.astro @@ -1,6 +1,9 @@ --- import type { User } from "~/env"; import { getSession } from "auth-astro/server"; +import Layout from "~/layouts/Layout.astro"; +import Container from "~/components/Container.astro"; +import { Image } from "astro:assets"; const session = await getSession(Astro.request); if (!session || !session.user) { @@ -8,8 +11,44 @@ if (!session || !session.user) { } const user = session.user as User; -console.log(user.guilds[0]); --- -

Welcome {user.name}

-{user.guilds.map((g) => g.id).join("\n\n")} + +
+ icon + +

+ @{user.name} +

+
+ + +
+ { + user.guilds.map((guild) => ( +
+
+ icon + +

{guild.name}

+
+
+ )) + } +
+
+
diff --git a/apps/website/tailwind.config.cjs b/apps/website/tailwind.config.cjs index 7f98fbf..160ad84 100644 --- a/apps/website/tailwind.config.cjs +++ b/apps/website/tailwind.config.cjs @@ -5,6 +5,7 @@ module.exports = { extend: { colors: { dark: "#111111", + "dark-100": "#1A1A1A", blue: "#5865F2", gold: "#FFA500", },