feat(27-02): remove Setups tab from Collection page

- TAB_ORDER reduced to [gear, planning]
- searchSchema z.enum updated; .catch("gear") handles old ?tab=setups URLs
- SetupsView import and render branch removed
- AnimatePresence, slide variants, CollectionView/PlanningView unchanged
This commit is contained in:
2026-04-10 23:43:49 +02:00
parent 329bfce379
commit 7fd9845c13

View File

@@ -4,10 +4,9 @@ import { useRef } from "react";
import { z } from "zod";
import { CollectionView } from "../../components/CollectionView";
import { PlanningView } from "../../components/PlanningView";
import { SetupsView } from "../../components/SetupsView";
const searchSchema = z.object({
tab: z.enum(["gear", "planning", "setups"]).catch("gear"),
tab: z.enum(["gear", "planning"]).catch("gear"),
});
export const Route = createFileRoute("/collection/")({
@@ -15,11 +14,10 @@ export const Route = createFileRoute("/collection/")({
component: CollectionPage,
});
const TAB_ORDER = ["gear", "planning", "setups"] as const;
const TAB_ORDER = ["gear", "planning"] as const;
const TAB_LABELS: Record<(typeof TAB_ORDER)[number], string> = {
gear: "Gear",
planning: "Planning",
setups: "Setups",
};
const slideVariants = {
@@ -70,10 +68,8 @@ function CollectionPage() {
>
{tab === "gear" ? (
<CollectionView />
) : tab === "planning" ? (
<PlanningView />
) : (
<SetupsView />
<PlanningView />
)}
</motion.div>
</AnimatePresence>