Init
This commit is contained in:
+22
-10
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useMemo, useState, useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import { useSearchParams, useRouter } from "next/navigation";
|
||||
import { CATEGORIES, PARTS } from "@/data/gunbuilderParts";
|
||||
import type { CategoryId, Part } from "@/types/gunbuilder";
|
||||
@@ -187,23 +188,34 @@ export default function GunbuilderPage() {
|
||||
</div>
|
||||
|
||||
{/* CTA */}
|
||||
<div className="mt-4 border-t border-zinc-800 pt-3">
|
||||
<div className="mt-4 border-t border-zinc-800 pt-3 space-y-2">
|
||||
<Link
|
||||
href="/gunbuilder/build"
|
||||
className={`block w-full rounded-md border border-amber-400/60 bg-amber-400/10 px-3 py-2 text-sm font-medium text-amber-200 hover:bg-amber-400/15 text-center transition-colors ${
|
||||
selectedParts.length === 0
|
||||
? "opacity-40 cursor-not-allowed pointer-events-none"
|
||||
: ""
|
||||
}`}
|
||||
>
|
||||
Continue to Buy
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
className="w-full rounded-md border border-amber-400/60 bg-amber-400/10 px-3 py-2 text-sm font-medium text-amber-200 hover:bg-amber-400/15 disabled:opacity-40 disabled:cursor-not-allowed"
|
||||
disabled={selectedParts.length === 0}
|
||||
onClick={() => {
|
||||
console.log("Build:", build);
|
||||
alert(
|
||||
"Prototype only: in the real app this would go to a sharable build summary with affiliate links.",
|
||||
);
|
||||
setBuild({});
|
||||
localStorage.removeItem(STORAGE_KEY);
|
||||
}}
|
||||
disabled={selectedParts.length === 0}
|
||||
className={`w-full rounded-md border border-zinc-700 bg-zinc-900/50 px-3 py-2 text-sm font-medium text-zinc-300 hover:bg-zinc-800 hover:border-zinc-600 transition-colors ${
|
||||
selectedParts.length === 0
|
||||
? "opacity-40 cursor-not-allowed"
|
||||
: ""
|
||||
}`}
|
||||
>
|
||||
Continue to Buy (Prototype)
|
||||
Clear Build
|
||||
</button>
|
||||
<p className="mt-2 text-[0.7rem] text-zinc-500">
|
||||
In the production version, this will take you to a build page with
|
||||
retailer links and sharing options.
|
||||
View your build summary with affiliate links and sharing options.
|
||||
</p>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user