Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 57 additions & 55 deletions frontend/valora-web/app/browse/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { use } from "react";
import { useQuery } from "@tanstack/react-query";
import { ArrowLeft, CalendarDays, Sparkles, Tag } from "lucide-react";
import { FeatureBadges } from "@/components/listings/feature-badges";
import { ListingImageGallery } from "@/components/listings/listing-image-gallery";
import { Footer } from "@/components/layout/footer";
import { Navbar } from "@/components/layout/navbar";
import { parseFeaturesJson } from "@/lib/listings/feature-parser";
Expand Down Expand Up @@ -81,68 +82,70 @@ export default function ListingDetailPage({

{query.data ? (
<section className="mt-6 grid gap-6 lg:grid-cols-[1.25fr_0.75fr]">
<div className="overflow-hidden rounded-[2.2rem] border border-emerald-950/8 bg-white/88 shadow-[0_20px_70px_rgba(16,24,40,0.08)]">
<div className="h-72 bg-[radial-gradient(circle_at_top_left,_rgba(110,231,183,0.8),_transparent_30%),linear-gradient(135deg,_#f0fdf4_0%,_#dcfce7_38%,_#ecfeff_100%)]" />

<div className="p-8">
<div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between">
<div>
<p className="text-sm font-medium text-emerald-900/50">
{formatCategory(query.data.categoryKey)}
</p>
<h1 className="mt-2 text-4xl font-black tracking-tight text-emerald-950">
{query.data.title}
</h1>
</div>
<div className="space-y-6">
<ListingImageGallery listing={query.data} />

<div className="overflow-hidden rounded-[2.2rem] border border-emerald-950/8 bg-white/88 shadow-[0_20px_70px_rgba(16,24,40,0.08)]">
<div className="p-8">
<div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between">
<div>
<p className="text-sm font-medium text-emerald-900/50">
{formatCategory(query.data.categoryKey)}
</p>
<h1 className="mt-2 text-4xl font-black tracking-tight text-emerald-950">
{query.data.title}
</h1>
</div>

<span className="rounded-full bg-emerald-100 px-4 py-2 text-sm font-bold text-emerald-900">
{query.data.status}
</span>
</div>
<span className="rounded-full bg-emerald-100 px-4 py-2 text-sm font-bold text-emerald-900">
{query.data.status}
</span>
</div>

<p className="mt-6 max-w-3xl text-base leading-8 text-emerald-950/68">
{query.data.description}
</p>
<p className="mt-6 max-w-3xl text-base leading-8 text-emerald-950/68">
{query.data.description}
</p>

<div className="mt-6">
<FeatureBadges featuresJson={query.data.featuresJson} maxItems={6} />
</div>
<div className="mt-6">
<FeatureBadges featuresJson={query.data.featuresJson} maxItems={6} />
</div>

<div className="mt-8 grid gap-4 md:grid-cols-2">
<div className="rounded-[1.6rem] bg-emerald-50 p-5">
<div className="flex items-center gap-2 text-emerald-900/55">
<Tag className="h-4 w-4" />
<p className="text-xs font-bold uppercase tracking-[0.18em]">
Vraagprijs
<div className="mt-8 grid gap-4 md:grid-cols-2">
<div className="rounded-[1.6rem] bg-emerald-50 p-5">
<div className="flex items-center gap-2 text-emerald-900/55">
<Tag className="h-4 w-4" />
<p className="text-xs font-bold uppercase tracking-[0.18em]">
Vraagprijs
</p>
</div>
<p className="mt-2 text-3xl font-black text-emerald-950">
{formatCurrency(query.data.askingPrice)}
</p>
</div>
<p className="mt-2 text-3xl font-black text-emerald-950">
{formatCurrency(query.data.askingPrice)}
</p>
</div>

<div className="rounded-[1.6rem] bg-lime-50 p-5">
<div className="flex items-center gap-2 text-lime-900/60">
<Sparkles className="h-4 w-4" />
<p className="text-xs font-bold uppercase tracking-[0.18em]">
Voorspelde prijs
<div className="rounded-[1.6rem] bg-lime-50 p-5">
<div className="flex items-center gap-2 text-lime-900/60">
<Sparkles className="h-4 w-4" />
<p className="text-xs font-bold uppercase tracking-[0.18em]">
Voorspelde prijs
</p>
</div>
<p className="mt-2 text-3xl font-black text-emerald-950">
{formatCurrency(query.data.predictedPrice)}
</p>
</div>
<p className="mt-2 text-3xl font-black text-emerald-950">
{formatCurrency(query.data.predictedPrice)}
</p>
</div>
</div>

<div className="mt-8 rounded-[1.6rem] bg-emerald-50/70 p-5">
<div className="flex items-center gap-2 text-emerald-900/60">
<CalendarDays className="h-4 w-4" />
<p className="text-sm font-semibold">
Geplaatst op{" "}
{new Intl.DateTimeFormat("nl-NL", {
dateStyle: "full",
}).format(new Date(query.data.createdAtUtc))}
</p>
<div className="mt-8 rounded-[1.6rem] bg-emerald-50/70 p-5">
<div className="flex items-center gap-2 text-emerald-900/60">
<CalendarDays className="h-4 w-4" />
<p className="text-sm font-semibold">
Geplaatst op{" "}
{new Intl.DateTimeFormat("nl-NL", {
dateStyle: "full",
}).format(new Date(query.data.createdAtUtc))}
</p>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -182,12 +185,11 @@ export default function ListingDetailPage({

<div className="soft-panel rounded-[2rem] p-6">
<h2 className="text-xl font-black text-emerald-950">
Marketplace indruk
Afbeelding-architectuur klaar
</h2>
<p className="mt-3 text-sm leading-7 text-emerald-950/65">
Deze detailpagina is nu al geschikt als basis voor je echte
marketplace flow. Straks kunnen we hier seller-info, related
listings, save actions en AI-insights aan toevoegen.
Deze detailpagina ondersteunt nu al een primary image en thumbnail
gallery zodra je backend listing images teruggeeft.
</p>
</div>
</aside>
Expand Down
16 changes: 16 additions & 0 deletions frontend/valora-web/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { AuthGuard } from "@/components/auth/auth-guard";
import { DashboardShell } from "@/components/dashboard/dashboard-shell";

interface DashboardLayoutProps {
children: React.ReactNode;
}

export default function DashboardLayout({
children,
}: DashboardLayoutProps): React.JSX.Element {
return (
<AuthGuard>
<DashboardShell>{children}</DashboardShell>
</AuthGuard>
);
}
15 changes: 15 additions & 0 deletions frontend/valora-web/app/dashboard/listings/[id]/edit/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { EditListingForm } from "@/components/dashboard/edit-listing-form";

interface DashboardEditListingPageProps {
params: Promise<{
id: string;
}>;
}

export default async function DashboardEditListingPage({
params,
}: DashboardEditListingPageProps): Promise<React.JSX.Element> {
const { id } = await params;

return <EditListingForm listingId={id} />;
}
5 changes: 5 additions & 0 deletions frontend/valora-web/app/dashboard/listings/new/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { CreateListingForm } from "@/components/dashboard/create-listing-form";

export default function DashboardNewListingPage(): React.JSX.Element {
return <CreateListingForm />;
}
5 changes: 5 additions & 0 deletions frontend/valora-web/app/dashboard/listings/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { MyListingsSection } from "@/components/dashboard/my-listings-section";

export default function DashboardListingsPage(): React.JSX.Element {
return <MyListingsSection />;
}
7 changes: 1 addition & 6 deletions frontend/valora-web/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { AuthGuard } from "@/components/auth/auth-guard";
import { DashboardHome } from "@/components/dashboard/dashboard-home";

export default function DashboardPage(): React.JSX.Element {
return (
<AuthGuard>
<DashboardHome />
</AuthGuard>
);
return <DashboardHome />;
}
2 changes: 1 addition & 1 deletion frontend/valora-web/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
radial-gradient(circle at 85% 10%, rgba(187, 247, 208, 0.85), transparent 18%),
radial-gradient(circle at 40% 100%, rgba(209, 250, 229, 0.8), transparent 28%),
linear-gradient(180deg, #f7fff9 0%, #f0fdf4 45%, #ecfeff 100%);
--foreground: #052e16;
--foreground: #052e06;
}

* {
Expand Down
Loading
Loading