Skip to content
Closed
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
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
"analyze": "ANALYZE=true next build --webpack"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.68.0",
"@auth/prisma-adapter": "^2.11.2",
"@formatjs/intl-localematcher": "^0.8.3",
"@hookform/resolvers": "^5.2.2",
"@marsidev/react-turnstile": "^1.4.0",
"@neondatabase/serverless": "^1.1.0",
"@prisma/adapter-neon": "^7.8.0",
"@prisma/adapter-pg": "^7.8.0",
Expand Down
46 changes: 46 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 4 additions & 12 deletions src/app/[lang]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Suspense } from "react";
import { Metadata } from "next";
import { getListings } from "@/components/host/actions";
import { createMetadata } from "@/lib/metadata";
Expand Down Expand Up @@ -29,6 +28,9 @@ async function getPublishedListings(): Promise<Listing[]> {
}
}

// Note: no <Suspense> here. The colocated `loading.tsx` already provides the
// streaming fallback for this segment; adding a redundant Suspense boundary
// triggers Next 16 Turbopack's "$RS parentNode null" hydration race.
export default async function HomePage({
params,
}: {
Expand All @@ -37,15 +39,5 @@ export default async function HomePage({
const { lang } = await params;
const listings = await getPublishedListings();

return (
<Suspense
fallback={
<div className="min-h-screen flex items-center justify-center" role="status" aria-label="Loading">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900" aria-hidden="true"></div>
</div>
}
>
<HomeContent listings={listings} locale={lang} />
</Suspense>
);
return <HomeContent listings={listings} locale={lang} />;
}
41 changes: 31 additions & 10 deletions src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
'use client';

import { useEffect } from 'react';
import { Button } from '@/components/ui/button';
import { AlertTriangle } from 'lucide-react';

// Inline SVG + native buttons instead of `lucide-react` / `@/components/ui/button`:
// Turbopack's error.tsx boundary fires before lazy chunks finish loading, so any
// external component import fails with "module factory is not available". Keep
// this file dependency-light — only `react` is safe to import here.
function AlertTriangle({ className }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className={className}
aria-hidden="true"
>
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" />
<path d="M12 9v4" />
<path d="M12 17h.01" />
</svg>
);
}

export default function Error({
error,
Expand Down Expand Up @@ -60,19 +82,18 @@ export default function Error({
</div>

<div className="flex gap-3 justify-center">
<Button
<button
onClick={reset}
size="lg"
className="inline-flex items-center justify-center rounded-md bg-primary px-6 py-2.5 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
>
Try again
</Button>
<Button
onClick={() => window.location.href = '/'}
variant="outline"
size="lg"
</button>
<button
onClick={() => (window.location.href = '/')}
className="inline-flex items-center justify-center rounded-md border border-input bg-background px-6 py-2.5 text-sm font-medium shadow-sm hover:bg-accent hover:text-accent-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
>
Go home
</Button>
</button>
</div>

<p className="text-xs text-gray-500">
Expand Down
138 changes: 0 additions & 138 deletions src/components/report-issue.tsx

This file was deleted.

Loading