Support sub-path deploy via NEXT_PUBLIC_BASE_PATH (loma.chat/pagiva)
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies, OAuth redirects, manifest, service worker and cron runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"use client";
|
||||
import { withBase } from "@/lib/base-path";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import Link from "next/link";
|
||||
@@ -138,7 +139,7 @@ function BriefForm({
|
||||
e.preventDefault();
|
||||
setError(null);
|
||||
setBusy(true);
|
||||
const res = await fetch("/api/analysis", {
|
||||
const res = await fetch(withBase("/api/analysis"), {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ pageId, business, audience, goal, budgetBaht: Number(budget.replace(/,/g, "")), days: Number(days) }),
|
||||
|
||||
Reference in New Issue
Block a user