subnav and other stuff

This commit is contained in:
2025-12-03 20:56:05 -05:00
parent 76ebb30d96
commit 7cee90381d
163 changed files with 1216 additions and 3515 deletions
+70 -14
View File
@@ -4,104 +4,160 @@ export const CATEGORIES: Category[] = [
// LOWER
{
id: "lower",
name: "Stripped Lower Receiver",
name: "Stripped Lowers",
description: "Serialized lower the foundation of the build.",
group: "lower",
},
{
id: "completeLower",
name: "Complete Lower",
name: "Complete Lowers",
description: "Factory-built lower with stock, buffer system, and controls.",
group: "lower",
},
{
id: "lowerParts",
name: "Lower Parts Kit",
name: "Lower Parts Kits",
description: "Pins, springs, and controls for the lower.",
group: "lower",
},
{
id: "trigger",
name: "Trigger / Fire Control",
description: "Single-stage, two-stage, and match triggers.",
group: "lower",
},
{
id: "grip",
name: "Pistol Grip",
description: "Grips that shape how the rifle handles.",
group: "lower",
},
{
id: "safety",
name: "Safety / Selector",
description: "Ambi selectors and control upgrades.",
group: "lower",
},
{
id: "buffer",
name: "Buffer System",
description: "Buffer tube, buffer, spring, and related parts.",
group: "lower",
},
{
id: "stock",
name: "Stock / Brace",
description: "Adjustable, fixed, and minimalist stocks.",
group: "lower",
},
// UPPER
{
id: "upper",
name: "Stripped Upper Receiver",
name: "Stripped Uppers",
description: "The core of the top half of your build.",
group: "upper",
},
{
id: "completeUpper",
name: "Complete Upper",
name: "Complete Uppers",
description: "Pre-assembled uppers ready to pin and shoot.",
group: "upper",
},
{
id: "bcg",
name: "Bolt Carrier Group",
name: "Bolt Carriers",
description: "The heartbeat of the rifles cycling.",
group: "upper",
},
{
id: "barrel",
name: "Barrel",
name: "Barrels",
description: "Different lengths, profiles, and calibers.",
group: "upper",
},
{
id: "gasBlock",
name: "Gas Block",
name: "Gas Blocks",
description: "Standard and adjustable gas blocks.",
group: "upper",
},
{
id: "gasTube",
name: "Gas Tube",
name: "Gas Tubes",
description: "Carbine, mid, rifle, and more.",
group: "upper",
},
{
id: "muzzleDevice",
name: "Muzzle Device",
name: "Muzzle Devices",
description: "Brakes, comps, and flash hiders.",
group: "upper",
},
{
id: "suppressor",
name: "Suppressor",
name: "Suppressors",
description: "Hearing-safe setups and hosts.",
group: "upper",
},
{
id: "handguard",
name: "Handguard / Rail",
name: "Handguards / Rails",
description: "M-LOK rails and front-end furniture.",
group: "upper",
},
{
id: "chargingHandle",
name: "Charging Handle",
name: "Charging Handles",
description: "Standard and ambi charging handles.",
group: "upper",
},
{
id: "sights",
name: "Iron Sights",
description: "Backup and primary irons.",
group: "upper",
},
{
id: "optic",
name: "Optic",
name: "Optics",
description: "LPVOs, red dots, and magnifiers.",
group: "upper",
},
// ACCESSORIES GROUP
{
id: "magazine",
name: "Magazines",
group: "accessories",
},
{
id: "weaponLight",
name: "Weapon Lights & Lasers",
group: "accessories",
},
{
id: "foregrip",
name: "Vertical / Angled Grips",
group: "accessories",
},
{
id: "bipod",
name: "Bipods",
group: "accessories",
},
{
id: "sling",
name: "Slings & Mounts",
group: "accessories",
},
{
id: "railAccessory",
name: "Rail Sections & Covers",
group: "accessories",
},
{
id: "tools",
name: "Tools & Maintenance",
group: "accessories",
},
];
+70 -8
View File
@@ -27,14 +27,76 @@ export const CATEGORY_TO_PART_ROLES: Record<CategoryId, string[]> = {
gasTube: ["gas-tube"],
muzzleDevice: ["muzzle-device", "compensator", "brake"],
suppressor: ["suppressor"],
// ===== ACCESSORIES =====
// Magazines
magazine: [
"magazine",
"mag",
"magazine-ar15",
"magazine-308",
"drum-magazine",
],
// Lights / Lasers
weaponLight: [
"weapon-light",
"light",
"weapon-light-laser",
"light-laser-combo",
"laser",
],
// Foregrips
foregrip: [
"vertical-grip",
"angled-foregrip",
"foregrip",
"handstop",
],
// Bipods
bipod: [
"bipod",
],
// Slings & mounts
sling: [
"sling",
"sling-mount",
"sling-swivel",
"qd-sling-mount",
],
// Rail sections & covers
railAccessory: [
"rail-section",
"picatinny-rail-section",
"m-lok-rail-section",
"keymod-rail-section",
"rail-cover",
"rail-panel",
],
// Tools & maintenance
tools: [
"tool",
"armorer-tool",
"armorer-wrench",
"cleaning-kit",
"bore-snake",
"vise-block",
"torque-wrench",
],
};
// Invert to get partRole -> CategoryId
export const PART_ROLE_TO_CATEGORY: Record<string, CategoryId> = Object
.entries(CATEGORY_TO_PART_ROLES)
.reduce((acc, [categoryId, roles]) => {
for (const role of roles) {
acc[role] = categoryId as CategoryId;
}
return acc;
}, {} as Record<string, CategoryId>);
export const PART_ROLE_TO_CATEGORY: Record<string, CategoryId> = Object.entries(
CATEGORY_TO_PART_ROLES,
).reduce((acc, [categoryId, roles]) => {
for (const role of roles) {
acc[role] = categoryId as CategoryId;
}
return acc;
}, {} as Record<string, CategoryId>);