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:
@@ -1,8 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { MapPin } from "lucide-react";
|
||||
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { useDataProvider } from "@/lib/demo/data-provider-context";
|
||||
import type { MyResidenceResponse } from "@/lib/api/residences";
|
||||
|
||||
interface ResidenceCardProps {
|
||||
@@ -11,19 +14,21 @@ interface ResidenceCardProps {
|
||||
|
||||
export function ResidenceCard({ data }: ResidenceCardProps) {
|
||||
const { residence, task_summary } = data;
|
||||
const { basePath } = useDataProvider();
|
||||
|
||||
const address = [residence.street_address, residence.city, residence.state_province]
|
||||
.filter(Boolean)
|
||||
.join(", ");
|
||||
|
||||
return (
|
||||
<Link href={`/app/residences/${residence.id}`} className="block">
|
||||
<Link href={`${basePath}/residences/${residence.id}`} className="block">
|
||||
<Card className="transition-colors hover:border-primary/40">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-base">{residence.name}</CardTitle>
|
||||
{address && (
|
||||
<div className="flex items-center gap-1.5 text-sm text-muted-foreground">
|
||||
<MapPin className="size-3.5 shrink-0" />
|
||||
<MapPin className="size-3.5 shrink-0" aria-hidden="true" />
|
||||
<span className="sr-only">Address:</span>
|
||||
<span className="truncate">{address}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user