Update code

This commit is contained in:
UltraLionFr
2025-08-20 14:14:33 +02:00
parent 174cf5ef60
commit 0c1a0d74d7
53 changed files with 3830 additions and 373 deletions
+30
View File
@@ -0,0 +1,30 @@
import { prisma } from '@/lib/prisma';
interface Props {
params: { id: string };
}
export default async function PastePage({ params }: Props) {
const paste = await prisma.paste.findUnique({
where: { id: params.id },
select: { title: true, content: true, createdAt: true, views: true },
});
if (!paste) return <div>Paste not found</div>;
return (
<div className="min-h-screen bg-[#0e0f13] text-white p-6">
<h1 className="text-3xl font-bold text-blue-400 mb-4">
{paste.title || 'Untitled'}
</h1>
<pre className="bg-[#11131c] p-6 rounded-xl whitespace-pre-wrap overflow-auto text-sm border border-white/10 shadow-lg">
{paste.content}
</pre>
<p className="mt-4 text-xs text-neutral-400">
Views: {paste.views} · Created at: {new Date(paste.createdAt).toLocaleString()}
</p>
</div>
);
}