1
0
Fork 0

Brighter background color, rearranging of elementes + empire count

This commit is contained in:
Neshura 2023-06-01 18:56:03 +02:00
parent 3e27047561
commit 6e07d6c564
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
3 changed files with 38 additions and 4 deletions
components/tables

View file

@ -0,0 +1,21 @@
'use client';
import useSWR from "swr";
const fetcher = async (url:any) => await fetch(url).then((res) => res.json());
export const EmpireStats = () => {
const {data} = useSWR('/api/empires',fetcher);
let ret;
if (data) {
ret = (
<div className="text-blue-600">{data.empireCount} Empires</div>
)
}
else {
ret = (<div></div>)
}
return ret
}