fixed part role mapping to categories. set a const for categories

This commit is contained in:
2025-12-02 21:13:17 -05:00
parent c51ce862a9
commit 4b823f49cf
196 changed files with 2820 additions and 164 deletions
+9 -5
View File
@@ -31,11 +31,15 @@ export function CategoryColumn({
</div>
<div className="flex-1 overflow-y-auto pr-1">
{parts.length === 0 && (
<p className="text-xs text-zinc-500">No parts yet for this category.</p>
<p className="text-xs text-zinc-500">No parts available yet.</p>
)}
{!displayedPart && parts.length > 0 && (
<div className="w-full border border-zinc-700 rounded-md p-3 mb-2 text-center">
<p className="text-sm text-zinc-500 flex items-center justify-center gap-2">
<div className="w-full border border-zinc-700 rounded-md p-3 mb-2 flex items-center justify-between gap-3">
<p className="text-sm text-zinc-500">No part selected</p>
<Link
href={`/gunbuilder/${category.id}`}
className="inline-flex items-center gap-2 rounded-md border border-zinc-700 bg-zinc-900/60 px-3 py-1.5 text-xs font-medium text-zinc-200 hover:bg-zinc-800 hover:border-zinc-500 transition-colors"
>
<svg
className="w-4 h-4"
fill="none"
@@ -50,7 +54,7 @@ export function CategoryColumn({
/>
</svg>
Choose a Part
</p>
</Link>
</div>
)}
{displayedPart && (
@@ -62,7 +66,7 @@ export function CategoryColumn({
/>
)}
</div>
{parts.length > 1 && (
{parts.length >= 1 && (
<Link
href={`/gunbuilder/${category.id}`}
className="mt-2 w-full rounded-md border border-zinc-700 bg-zinc-900/50 px-3 py-2 text-xs font-medium text-zinc-300 hover:bg-zinc-800 hover:border-zinc-600 transition-colors text-center"