fixing url issues with renaming
This commit is contained in:
@@ -163,7 +163,7 @@ export default function CategoryPage() {
|
||||
...prev,
|
||||
[categoryId]: partId,
|
||||
}));
|
||||
router.push("/gunbuilder");
|
||||
router.push("/builder");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -309,7 +309,7 @@ export default function CategoryPage() {
|
||||
Category Not Found
|
||||
</h1>
|
||||
<Link
|
||||
href="/gunbuilder"
|
||||
href="/builder"
|
||||
className="text-amber-300 hover:text-amber-200 underline"
|
||||
>
|
||||
Return to Gunbuilder
|
||||
@@ -326,7 +326,7 @@ export default function CategoryPage() {
|
||||
{/* Header */}
|
||||
<header className="mb-6">
|
||||
<Link
|
||||
href="/gunbuilder"
|
||||
href="/builder"
|
||||
className="text-xs text-zinc-400 hover:text-zinc-300 mb-4 inline-block"
|
||||
>
|
||||
← Back to The Armory
|
||||
@@ -670,7 +670,7 @@ export default function CategoryPage() {
|
||||
</div>
|
||||
<div className="mt-2 flex gap-2">
|
||||
<Link
|
||||
href={`/gunbuilder/${categoryId}/${part.id}`}
|
||||
href={`/builder/${categoryId}/${part.id}`}
|
||||
className="flex-1 rounded-md border border-zinc-700 bg-zinc-800/50 px-3 py-2 text-center text-xs font-medium text-zinc-300 transition-colors hover:border-zinc-600 hover:bg-zinc-700"
|
||||
>
|
||||
View Details
|
||||
@@ -733,7 +733,7 @@ export default function CategoryPage() {
|
||||
</div>
|
||||
<div className="flex justify-end gap-2">
|
||||
<Link
|
||||
href={`/gunbuilder/${categoryId}/${part.id}`}
|
||||
href={`/builder/${categoryId}/${part.id}`}
|
||||
className="whitespace-nowrap rounded-md border border-zinc-700 bg-zinc-800/50 px-3 py-1.5 text-xs font-medium text-zinc-300 transition-colors hover:border-zinc-600 hover:bg-zinc-700"
|
||||
>
|
||||
View Details
|
||||
|
||||
@@ -175,7 +175,7 @@ export default function GunbuilderPage() {
|
||||
return updated;
|
||||
});
|
||||
|
||||
router.replace("/gunbuilder", { scroll: false });
|
||||
router.replace("/builder", { scroll: false });
|
||||
}
|
||||
}
|
||||
}, [searchParams, router]);
|
||||
@@ -223,7 +223,7 @@ export default function GunbuilderPage() {
|
||||
const payload = JSON.stringify(build);
|
||||
const encoded = window.btoa(payload);
|
||||
const origin = window.location?.origin ?? "";
|
||||
const url = `${origin}/gunbuilder/build?build=${encodeURIComponent(
|
||||
const url = `${origin}/builder/build?build=${encodeURIComponent(
|
||||
encoded,
|
||||
)}`;
|
||||
setShareUrl(url);
|
||||
@@ -338,10 +338,10 @@ export default function GunbuilderPage() {
|
||||
<header className="mb-6">
|
||||
<div>
|
||||
<p className="text-xs font-semibold tracking-[0.2em] uppercase text-zinc-500">
|
||||
Shadow Standard Co.
|
||||
BATTL BUILDERS
|
||||
</p>
|
||||
<h1 className="mt-1 text-2xl md:text-3xl font-semibold tracking-tight">
|
||||
The Build Bench: <span className="text-amber-300">Early Access</span>
|
||||
BattlBuilder <span className="text-amber-300">Early Access</span>
|
||||
</h1>
|
||||
<p className="mt-2 text-sm text-zinc-400 max-w-xl">
|
||||
Explore components from trusted brands, choose one part per
|
||||
@@ -372,7 +372,7 @@ export default function GunbuilderPage() {
|
||||
{/* Primary actions now live under the total */}
|
||||
<div className="mt-2 flex flex-col items-stretch gap-2 sm:flex-row sm:flex-wrap">
|
||||
<Link
|
||||
href="/gunbuilder/build"
|
||||
href="/builder/build"
|
||||
className={`w-full sm:w-auto 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"
|
||||
@@ -598,7 +598,7 @@ export default function GunbuilderPage() {
|
||||
{selectedPart && selectedPart.url ? (
|
||||
<>
|
||||
<Link
|
||||
href={`/gunbuilder/${category.id}`}
|
||||
href={`/builder/${category.id}`}
|
||||
className="hidden md:inline-flex items-center justify-center rounded-md border border-zinc-700 bg-zinc-900/70 px-2 py-1 hover:bg-zinc-800 hover:border-zinc-600 transition-colors"
|
||||
aria-label="Change part"
|
||||
title="Change part"
|
||||
@@ -618,7 +618,7 @@ export default function GunbuilderPage() {
|
||||
</>
|
||||
) : hasParts ? (
|
||||
<Link
|
||||
href={`/gunbuilder/${category.id}`}
|
||||
href={`/builder/${category.id}`}
|
||||
className="inline-flex rounded-md border border-zinc-700 bg-zinc-900/70 px-2.5 py-1 text-[0.7rem] font-medium text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors"
|
||||
onClick={() => {
|
||||
// If you want to pre-select something later, you can handle here.
|
||||
|
||||
@@ -24,7 +24,7 @@ export function BuilderNav({ activeCategoryId }: BuilderNavProps) {
|
||||
const currentCategory =
|
||||
activeCategoryId ?? searchParams.get("category") ?? undefined;
|
||||
|
||||
const baseHref = "/gunbuilder";
|
||||
const baseHref = "/builder";
|
||||
|
||||
const renderDropdown = (label: string, items: Category[]) => {
|
||||
if (!items.length) return null;
|
||||
|
||||
@@ -37,7 +37,7 @@ export function CategoryColumn({
|
||||
<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}`}
|
||||
href={`/builder/${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
|
||||
@@ -68,7 +68,7 @@ export function CategoryColumn({
|
||||
</div>
|
||||
{parts.length >= 1 && (
|
||||
<Link
|
||||
href={`/gunbuilder/${category.id}`}
|
||||
href={`/builder/${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"
|
||||
>
|
||||
View All ({parts.length})
|
||||
|
||||
@@ -42,7 +42,7 @@ export function TopNav() {
|
||||
{/* Center: main nav (Builder / Admin) */}
|
||||
<nav className="hidden items-center gap-4 md:flex">
|
||||
<Link
|
||||
href="/gunbuilder"
|
||||
href="/builder"
|
||||
className="text-xs font-medium text-zinc-300 hover:text-zinc-50 transition-colors"
|
||||
>
|
||||
Builder
|
||||
|
||||
Reference in New Issue
Block a user