feat: Phase 4-5 — demo mode, polish, deploy, and bug fixes
Add demo mode with mock data provider, Docker deployment, Playwright tests, PostHog analytics, error boundaries, and SEO metadata. Fix residences API response unwrapping, kanban drag-and-drop with optimistic updates, trailing slash proxy redirects, and column name mismatches with Go API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const API_BASE_URL =
|
||||
process.env.NEXT_PUBLIC_API_URL || 'https://mycrib.treytartt.com/api';
|
||||
process.env.NEXT_PUBLIC_API_URL || 'https://casera.treytartt.com/api';
|
||||
|
||||
/**
|
||||
* Server-only base URL. Falls back to the public one so that server
|
||||
@@ -45,8 +45,10 @@ export async function apiFetch<T>(
|
||||
path: string,
|
||||
options: RequestInit = {},
|
||||
): Promise<T> {
|
||||
// Ensure trailing slash (Go API requires it)
|
||||
const normalized = path.endsWith('/') ? path : `${path}/`;
|
||||
// Strip trailing slash for the Next.js proxy URL (Next.js 308-redirects
|
||||
// trailing slashes away by default). The proxy route handler re-adds the
|
||||
// trailing slash when forwarding to the Go API.
|
||||
const normalized = path.endsWith('/') ? path.slice(0, -1) : path;
|
||||
const url = `/api/proxy${normalized}`;
|
||||
|
||||
const headers: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user