fixed login auth issue
CI / test (push) Successful in 5s

This commit is contained in:
2026-01-27 09:23:38 -05:00
parent 77c31ae4f9
commit cb46430ce4
3 changed files with 10 additions and 12 deletions
+2 -2
View File
@@ -417,9 +417,9 @@ export default function PrivacyPolicy() {
<br /> <br />
Battl Builder, LLC. Battl Builder, LLC.
<br /> <br />
[Your Address] {/* [Your Address]
<br /> <br />
[City, State, ZIP] [City, State, ZIP] */}
</p> </p>
</div> </div>
<p className="mt-4 text-sm"> <p className="mt-4 text-sm">
+6 -9
View File
@@ -2,20 +2,17 @@
import type { ReactNode } from "react"; import type { ReactNode } from "react";
import { Suspense } from "react"; import { Suspense } from "react";
import { AuthProvider } from "@/context/AuthContext";
import { BuilderNav } from "@/components/BuilderNav"; import { BuilderNav } from "@/components/BuilderNav";
import { TopNav } from "@/components/TopNav"; import { TopNav } from "@/components/TopNav";
export default function BuilderLayout({ children }: { children: ReactNode }) { export default function BuilderLayout({ children }: { children: ReactNode }) {
return ( return (
<div className="min-h-screen bg-neutral-950 text-zinc-50"> <div className="min-h-screen bg-neutral-950 text-zinc-50">
<AuthProvider> <TopNav />
<TopNav /> <Suspense fallback={<div className="h-[52px]" />}>
<Suspense fallback={<div className="h-[52px]" />}> <BuilderNav />
<BuilderNav /> </Suspense>
</Suspense> <main className="min-h-screen">{children}</main>
<main className="min-h-screen">{children}</main>
</AuthProvider>
</div> </div>
); );
} }
+2 -1
View File
@@ -13,7 +13,7 @@ const API_BASE_URL =
function LoginPageContent() { function LoginPageContent() {
const router = useRouter(); const router = useRouter();
const searchParams = useSearchParams(); const searchParams = useSearchParams();
const { login, loading } = useAuth(); const { login, refreshUser, loading } = useAuth();
const [email, setEmail] = useState(""); const [email, setEmail] = useState("");
const [password, setPassword] = useState(""); const [password, setPassword] = useState("");
@@ -36,6 +36,7 @@ function LoginPageContent() {
try { try {
await login({ email, password }); await login({ email, password });
await refreshUser();
router.push(next); router.push(next);
} catch (err: any) { } catch (err: any) {
setError(err?.message ?? "Failed to log in"); setError(err?.message ?? "Failed to log in");