style: flipping cards as background
This commit is contained in:
17
app/api/news/route.ts
Normal file
17
app/api/news/route.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import prisma from '../../../prisma/prisma';
|
||||
import { ApiResponse } from '../../../utils/apiResponse';
|
||||
|
||||
export async function GET() {
|
||||
const news = await prisma.news.findMany({
|
||||
orderBy: {
|
||||
createdAt: 'desc'
|
||||
},
|
||||
take: 50
|
||||
});
|
||||
|
||||
if (news && news.length === 50) {
|
||||
return ApiResponse(200, JSON.stringify(news));
|
||||
}
|
||||
|
||||
return ApiResponse(500, 'Internal server error');
|
||||
}
|
||||
@@ -66,16 +66,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
@apply bg-custom-background bg-size-cover;
|
||||
}
|
||||
}
|
||||
|
||||
.styledH2 {
|
||||
@apply text-xl font-bold;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Analytics } from '@vercel/analytics/react';
|
||||
import type { Metadata } from 'next';
|
||||
import { Inter as FontSans } from 'next/font/google';
|
||||
import { Background } from '../components/custom/background/background';
|
||||
import { cn } from '../utils/utils';
|
||||
import './globals.css';
|
||||
|
||||
@@ -29,7 +30,7 @@ export default function RootLayout({
|
||||
fontSans.variable
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
<Background>{children}</Background>
|
||||
<Analytics />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -434,7 +434,7 @@ export default function Privacy() {
|
||||
title='Privacy Policy'
|
||||
description='Last updated: December 03, 2023'
|
||||
content={body}
|
||||
style='w-2/3'
|
||||
style='w-2/3 overflow-auto h-[90vh]'
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user