Connect app to MySQL database at 192.168.4.20
This commit is contained in:
3
app/globals.css
Normal file
3
app/globals.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
22
app/layout.tsx
Normal file
22
app/layout.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { Metadata } from 'next'
|
||||
import './globals.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Ultimate Lists',
|
||||
description: 'The ultimate todo list app',
|
||||
manifest: '/manifest.json',
|
||||
themeColor: '#3B82F6',
|
||||
viewport: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no',
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className="bg-gray-50 min-h-screen">{children}</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
32
app/page.tsx
Normal file
32
app/page.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { PlusIcon } from 'lucide-react'
|
||||
import { getLists } from '@/lib/actions'
|
||||
import ListCard from '@/components/ListCard'
|
||||
|
||||
export default async function Home() {
|
||||
const lists = await getLists()
|
||||
|
||||
return (
|
||||
<main className="container mx-auto px-4 py-8 max-w-4xl">
|
||||
<div className="flex items-center justify-between mb-8">
|
||||
<h1 className="text-3xl font-bold text-gray-900">Ultimate Lists</h1>
|
||||
<button className="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center gap-2 transition-colors">
|
||||
<PlusIcon size={20} />
|
||||
New List
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{lists.map((list) => (
|
||||
<ListCard key={list.id} list={list} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{lists.length === 0 && (
|
||||
<div className="text-center py-12">
|
||||
<p className="text-gray-500 text-lg mb-4">No lists yet</p>
|
||||
<p className="text-gray-400">Create your first list to get started</p>
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user