diff --git a/prettier.config.js b/prettier.config.js index c21e0da..c2e2cdd 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -4,8 +4,9 @@ module.exports = { singleQuote: true, printWidth: 120, tabWidth: 4, - plugins: ['prettier-plugin-tailwindcss', '@trivago/prettier-plugin-sort-imports'], + plugins: ['@trivago/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'], importOrder: ['^@/components/(.*)$', '^@/(.*)$', '^[./]'], importOrderSeparation: true, importOrderSortSpecifiers: true, + tailwindFunctions: ['cva', 'cn'], }; diff --git a/src/app/guilds/page.tsx b/src/app/guilds/page.tsx index 13235f0..b2d3cea 100644 --- a/src/app/guilds/page.tsx +++ b/src/app/guilds/page.tsx @@ -1,6 +1,10 @@ import { and, eq, getTableColumns } from 'drizzle-orm'; +import { Plus } from 'lucide-react'; +import Link from 'next/link'; import { redirect } from 'next/navigation'; +import { Button } from '@/components/ui/button'; + import db from '@/db'; import { guildMemberships, guilds } from '@/db/schema'; import { ssrGetCurrentUser } from '@/lib/auth'; @@ -21,7 +25,7 @@ export default async function GuildsPage() { const currentUser = (await ssrGetCurrentUser())!; const currentUserGuilds = await db - .select({ ...getTableColumns(guilds) }) + .select({ ...getTableColumns(guilds), admin: guildMemberships.admin }) .from(guilds) .innerJoin( guildMemberships, @@ -29,8 +33,37 @@ export default async function GuildsPage() { ); return ( -
{JSON.stringify(currentUserGuilds, null, 2)}+