diff --git a/README.md b/README.md
index 20286ec..48a13b9 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,5 @@
# Hackernews newsletter
-## To do
-
-- Polish the UI
-
## Vercel basics
Install vercel cli
diff --git a/app/api/news/route.ts b/app/api/news/route.ts
new file mode 100644
index 0000000..12cfff7
--- /dev/null
+++ b/app/api/news/route.ts
@@ -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');
+}
diff --git a/app/globals.css b/app/globals.css
index 5cb4d5d..c0a1ebd 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -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;
}
diff --git a/app/layout.tsx b/app/layout.tsx
index 9c8b015..db99d0b 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -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}
+ {children}