From a4844efe226f18cc302fbfa5e68ee7cb00c2c443 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Tue, 28 Jul 2026 14:03:39 -0400 Subject: [PATCH] feat(grid): integrate grid view into structure detail page Replace flat ResourceList with StructureStorageView (grid/list toggle for structures with dimensions, flat list fallback for non-grid structures). Apply pluralize to upkeep labels. --- src/app/(frontend)/logistics/structures/[id]/page.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/(frontend)/logistics/structures/[id]/page.tsx b/src/app/(frontend)/logistics/structures/[id]/page.tsx index 3917394..3bf481c 100644 --- a/src/app/(frontend)/logistics/structures/[id]/page.tsx +++ b/src/app/(frontend)/logistics/structures/[id]/page.tsx @@ -5,8 +5,8 @@ import Link from "next/link"; import { GameStructure, Structure, Faction, Resource } from "@/payload-types"; import { convertLexicalToPlaintext } from "@payloadcms/richtext-lexical/plaintext"; import { CapacityBar } from "@/components/frontend/storage/CapacityBar"; -import { ResourceList } from "@/components/frontend/storage/ResourceList"; import { StorageRules } from "@/components/frontend/storage/StorageRules"; +import { StructureStorageView } from "@/components/frontend/storage/StructureStorageView"; import { calculateStoredMass, calculateUtilization, @@ -14,6 +14,7 @@ import { getFunctionTypeLabel, getGridSlots, } from "@/lib/logistics"; +import { pluralize } from "@/lib/utils"; import { ArrowLeftIcon, BoxIcon, @@ -200,9 +201,8 @@ export default async function StructureDetailPage({ params }: StructureDetailPag )} - - {resource.name}: {upkeep.amount?.toLocaleString()} {resource.unitOfMeasure}/tick + {resource.name}: {upkeep.amount?.toLocaleString()} {pluralize(upkeep.amount ?? 0, resource.unitOfMeasure)}/tick ); })}