mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-11 16:01:27 +00:00
add proper server region to card
This commit is contained in:
@@ -53,7 +53,7 @@ export const ServerCard = ({ id }: { id: string }) => {
|
||||
>
|
||||
<div className="flex flex-col text-sm">
|
||||
<ServerSpecs server_id={server.id} />
|
||||
<ServerRegion />
|
||||
<ServerRegion serverId={server.id} />
|
||||
</div>
|
||||
</ResourceCard>
|
||||
</Link>
|
||||
|
||||
@@ -47,11 +47,17 @@ export const ServerSpecs = ({ server_id }: { server_id: string }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const ServerRegion = () => {
|
||||
export const ServerRegion = ({
|
||||
serverId,
|
||||
}: {
|
||||
serverId: string | undefined;
|
||||
}) => {
|
||||
const servers = useRead("ListServers", {}).data;
|
||||
const server = servers?.find((s) => s.id === serverId);
|
||||
return (
|
||||
<div className="flex gap-2 items-center text-muted-foreground">
|
||||
<MapPin className="w-4 h-4" />
|
||||
server.region
|
||||
{server?.region || "region unknown"}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user