style: refine admin dashboard and project management UI with cohesive color palette and improved readability

- Update background colors and text styles for better contrast and legibility.
- Enhance button styles and hover effects for a more modern look.
- Remove unnecessary scaling effects and adjust border styles for consistency.
- Introduce a cohesive design language across components to improve user experience.
This commit is contained in:
2026-01-10 02:40:50 +01:00
parent 7d84d35f09
commit b051d9d2ef
14 changed files with 387 additions and 314 deletions

25
app/api/contacts/route.ts Normal file
View File

@@ -0,0 +1,25 @@
import { NextRequest, NextResponse } from 'next/server';
import { prisma } from '@/lib/prisma';
export async function GET(request: NextRequest) {
try {
// In a real app, you would check for admin session here
// For now, we trust the 'x-admin-request' header if it's set by the server-side component or middleware
// but typically you'd verify the session cookie/token
const contacts = await prisma.contact.findMany({
orderBy: {
createdAt: 'desc',
},
take: 100,
});
return NextResponse.json({ contacts });
} catch (error) {
console.error('Error fetching contacts:', error);
return NextResponse.json(
{ error: 'Failed to fetch contacts' },
{ status: 500 }
);
}
}