|
1 | 1 | import Link from 'next/link' |
| 2 | +import { |
| 3 | + Library, |
| 4 | + Book, |
| 5 | + Users, |
| 6 | + UserCog, |
| 7 | + CreditCard, |
| 8 | + ScrollText, |
| 9 | + BookCopy, |
| 10 | +} from 'lucide-react' |
| 11 | +import { Button } from '@/components/ui/button' |
| 12 | + |
| 13 | +export default function LibraryDashboard() { |
| 14 | + const menuItems = [ |
| 15 | + { title: 'Libraries', icon: Library, href: '/libraries' }, |
| 16 | + { title: 'Books', icon: Book, href: '/books' }, |
| 17 | + { title: 'Users', icon: Users, href: '/users' }, |
| 18 | + { title: 'Staffs', icon: UserCog, href: '/staffs' }, |
| 19 | + { title: 'Memberships', icon: CreditCard, href: '/memberships' }, |
| 20 | + { title: 'Subscriptions', icon: ScrollText, href: '/subscriptions' }, |
| 21 | + { title: 'Borrows', icon: BookCopy, href: '/borrows' }, |
| 22 | + ] |
2 | 23 |
|
3 | | -export default function Home() { |
4 | 24 | return ( |
5 | | - <main className="grid place-items-center h-screen"> |
6 | | - <div className="grid grid-cols-3 gap-4"> |
7 | | - <Link href="/libraries">Libraries</Link> |
8 | | - <Link href="/books">Books</Link> |
9 | | - <Link href="/users">Users</Link> |
10 | | - <Link href="/staffs">Staffs</Link> |
11 | | - <Link href="/memberships">Memberships</Link> |
12 | | - <Link href="/subscriptions">Subscriptions</Link> |
13 | | - <Link href="/borrows">Borrows</Link> |
| 25 | + <main className="min-h-screen bg-white p-8"> |
| 26 | + <div className="max-w-2xl mx-auto"> |
| 27 | + <h1 className="text-2xl font-bold mb-8">Library Management</h1> |
| 28 | + <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3"> |
| 29 | + {menuItems.map((item) => { |
| 30 | + const Icon = item.icon |
| 31 | + return ( |
| 32 | + <Link key={item.href} href={item.href}> |
| 33 | + <Button |
| 34 | + variant="outline" |
| 35 | + className="w-full h-24 flex flex-col items-center justify-center gap-2 hover:bg-slate-50" |
| 36 | + > |
| 37 | + <Icon className="w-6 h-6" /> |
| 38 | + <span>{item.title}</span> |
| 39 | + </Button> |
| 40 | + </Link> |
| 41 | + ) |
| 42 | + })} |
| 43 | + </div> |
14 | 44 | </div> |
15 | 45 | </main> |
16 | 46 | ) |
|
0 commit comments