clean up and disabled beta lock
CI / test (push) Successful in 27s

This commit is contained in:
2026-03-11 07:32:58 -04:00
parent 140b83bd65
commit f8265063d5
5 changed files with 49 additions and 17 deletions
-4
View File
@@ -7,7 +7,3 @@ NEXT_PUBLIC_LAUNCH_ONLY_ROOT=false
NEXT_PUBLIC_SHORTLINK_BASE_URL=http://localhost:8080 NEXT_PUBLIC_SHORTLINK_BASE_URL=http://localhost:8080
# Brevo API key for beta sign up collection
BREVO_API_KEY=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
BREVO_LIST_ID=9
+2 -4
View File
@@ -2,10 +2,8 @@
NEXT_PUBLIC_API_BASE_URL=http://battlbuilder-api:8080 NEXT_PUBLIC_API_BASE_URL=http://battlbuilder-api:8080
# Middleware to limited site to only root page # Middleware to limited site to only root page
LAUNCH_ONLY_ROOT=true LAUNCH_ONLY_ROOT=false
NEXT_PUBLIC_SHORTLINK_BASE_URL=https://battl.build NEXT_PUBLIC_SHORTLINK_BASE_URL=https://battl.build
# Brevo API key for beta sign up collection
BREVO_API_KEY=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
BREVO_LIST_ID=9
@@ -0,0 +1,43 @@
"use client";
import { useEffect } from "react";
import { useSearchParams, useRouter } from "next/navigation";
import { Suspense } from "react";
const STORAGE_KEY = "gunbuilder-build-state";
function BuildLoader() {
const searchParams = useSearchParams();
const router = useRouter();
useEffect(() => {
const encoded = searchParams.get("build");
if (encoded) {
try {
const decoded = JSON.parse(atob(encoded));
if (decoded && typeof decoded === "object") {
localStorage.setItem(STORAGE_KEY, JSON.stringify(decoded));
}
} catch {
// Bad payload — just go to builder anyway, it'll load fresh
}
}
router.replace("/builder");
}, [searchParams, router]);
return (
<main className="min-h-screen bg-black text-zinc-50 flex items-center justify-center">
<p className="text-sm text-zinc-400">Loading build</p>
</main>
);
}
export default function BuildPage() {
return (
<Suspense>
<BuildLoader />
</Suspense>
);
}
+4 -4
View File
@@ -172,12 +172,12 @@ export default function HomePage() {
</div> </div>
<nav className="flex items-center gap-2 sm:gap-3"> <nav className="flex items-center gap-2 sm:gap-3">
<a <Link
href="#request-access" href="/builder"
className="rounded-md border border-zinc-800 bg-zinc-950/60 px-3 py-2 text-xs font-medium text-zinc-200 hover:bg-zinc-900 hover:text-white" className="rounded-md border border-zinc-800 bg-zinc-950/60 px-3 py-2 text-xs font-medium text-zinc-200 hover:bg-zinc-900 hover:text-white"
> >
Request Access Go To Builder
</a> </Link>
<Link <Link
href="/login" href="/login"
-5
View File
@@ -77,11 +77,6 @@ export function middleware(req: NextRequest) {
if (!isLoggedIn) return redirectToLogin(req); if (!isLoggedIn) return redirectToLogin(req);
} }
// Protect the builder UI
if (pathname === "/builder" || pathname.startsWith("/builder/")) {
if (!isLoggedIn) return redirectToLogin(req);
}
return NextResponse.next(); return NextResponse.next();
} }