feat: add prisma support, admin panel and auth

This commit is contained in:
AyrisAI
2026-05-15 19:11:17 +03:00
parent 31c3deb2da
commit 09a105cd1e
29 changed files with 3606 additions and 441 deletions

20
app/admin/items/page.tsx Normal file
View File

@@ -0,0 +1,20 @@
import React from 'react';
import { prisma } from '@/app/lib/prisma';
import ItemManager from './ItemManager';
export const dynamic = 'force-dynamic';
export default async function AdminItemsPage() {
const items = await prisma.item.findMany({
include: {
category: true
},
orderBy: { createdAt: 'desc' }
});
const categories = await prisma.category.findMany({
orderBy: { title: 'asc' }
});
return <ItemManager items={items} categories={categories} />;
}