functional minimum

This commit is contained in:
41666 2023-02-01 22:16:10 -05:00
parent 789cb7bdfb
commit eb6164ef47
5 changed files with 75 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import type { IndexResponse, World } from "~/utils/saerro";
import { indexQuery } from "~/utils/saerro";
import { useLoaderData } from "@remix-run/react";
import { json } from "@remix-run/cloudflare";
import { FactionBar } from "~/components/FactionBar";
export const loader = async () => {
return json(await indexQuery());
@ -26,10 +27,15 @@ const WorldCard = ({ world }: { world: World }) => {
<CardBase>
<CardHeader to={`/worlds/${world.id}`}>
<div>{world.name}</div>
<div>
<HiChevronRight />
</div>
<HiChevronRight />
</CardHeader>
<div>
<div>Population: {world.population.total.toLocaleString()}</div>
<div>
<FactionBar {...world.population} />
</div>
</div>
</CardBase>
);
};