yiekheng dea57e6b28 Drop R2 URL signing; serve images via custom domain
Images now load direct from images.04080616.xyz. Removes read-side
signing (signUrl/signCoverUrls + callers), unlocking browser and
edge caching since URLs are stable. Presigned upload kept for /api/upload.
PageReader retries failed loads via onError as a safety net.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:29:11 +08:00

42 lines
1002 B
TypeScript

import { prisma } from "@/lib/db";
import { MangaGrid } from "@/components/MangaGrid";
import type { Metadata } from "next";
export const metadata: Metadata = {
title: "Search",
};
type Props = {
searchParams: Promise<{ q?: string }>;
};
export default async function SearchPage({ searchParams }: Props) {
const { q } = await searchParams;
const manga = q
? await prisma.manga.findMany({
where: {
status: "PUBLISHED",
title: { contains: q, mode: "insensitive" },
},
orderBy: { title: "asc" },
include: { _count: { select: { chapters: true } } },
})
: [];
return (
<div className="max-w-7xl mx-auto px-4 py-6">
<h1 className="text-xl font-bold mb-4">
{q ? `Results for "${q}"` : "Search"}
</h1>
{q ? (
<MangaGrid manga={manga} />
) : (
<p className="text-muted text-center py-12">
Use the search bar above to find manga
</p>
)}
</div>
);
}