/** * Servers overview page */ import { useQuery } from '@tanstack/react-query'; import { Link } from 'react-router-dom'; import { guildsApi } from '../services/api'; export function Servers() { const { data: guilds, isLoading } = useQuery({ queryKey: ['guilds'], queryFn: guildsApi.list, }); const total = guilds?.length ?? 0; const premiumCount = guilds?.filter((guild) => guild.premium).length ?? 0; const standardCount = total - premiumCount; return (
All servers that have added GuardDen
| Server | Server ID | Owner ID | Plan | Actions |
|---|---|---|---|---|
| {guild.name} | {guild.id} | {guild.owner_id} | {guild.premium ? 'Premium' : 'Standard'} | Configure |