feat: implement DetailDialog component for PDF viewing and downloading; refactor API calls to use environment variables

This commit is contained in:
2025-09-04 07:38:58 -06:00
parent 1808ce6f81
commit 2367baa538
10 changed files with 195 additions and 80 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ export function AdjustAIButton({ plan }: { plan: PlanFull }) {
async function apply() {
setLoading(true)
await fetch('https://genesis-engine.apps.lci.ulsa.mx/api/mejorar/plan', {
await fetch(`${import.meta.env.VITE_BACK_ORIGIN}/api/mejorar/plan`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt, plan_id: plan.id }),
}).catch(() => { })