added v2 RigSwitcher and Builder

This commit is contained in:
makearmy 2025-09-29 15:34:49 -04:00
parent 63ddd29393
commit 0cf4661264
5 changed files with 352 additions and 250 deletions

View file

@ -4,6 +4,7 @@
import { useRouter, useSearchParams } from "next/navigation";
import { cn } from "@/lib/utils";
import RigsListClient from "@/app/rigs/RigsListClient";
import RigBuilderClient from "@/app/rigs/RigBuilderClient";
const TABS = [
{ key: "my", label: "My Rigs" },
@ -19,17 +20,9 @@ function Panel({ tab }: { tab: string }) {
</div>
);
case "add":
// Placeholder: well retrofit the builder (or a minimal create form) next sprint
return (
<div className="rounded-md border p-4 space-y-3">
<div className="text-sm opacity-70">
Add Rig form will go here. Well wire to <code>POST /api/my/rigs</code> with user auth.
</div>
<ul className="text-sm list-disc pl-5 opacity-70">
<li>Fields: name (required), rig_type (required), optional notes</li>
<li>Use <code>/api/options/user_rig_type</code> for types</li>
<li>On success: refresh list tab</li>
</ul>
<div className="rounded-md border p-4">
<RigBuilderClient />
</div>
);
default: