|
1 | | -import Image from "next/image"; |
| 1 | +import { getAllOrganizations } from "@/lib/organization"; |
| 2 | +import OrganizationCard from "@/components/organization/organization-card"; |
| 3 | +import { Title } from "@/components/ui/title"; |
| 4 | +import { Text } from "@/components/ui/text"; |
2 | 5 |
|
3 | 6 | export default function Home() { |
| 7 | + const organizations = getAllOrganizations(); |
| 8 | + |
4 | 9 | return ( |
5 | | - <div className="flex items-center justify-center bg-zinc-50 font-sans dark:bg-black"> |
6 | | - <main className="flex w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start"> |
7 | | - <Image |
8 | | - className="dark:invert" |
9 | | - src="/next.svg" |
10 | | - alt="Next.js logo" |
11 | | - width={100} |
12 | | - height={20} |
13 | | - priority |
14 | | - /> |
15 | | - <div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left"> |
16 | | - <h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50"> |
17 | | - To get started, edit the page.tsx file. |
18 | | - </h1> |
19 | | - <p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400"> |
20 | | - Looking for a starting point or more instructions? Head over to{" "} |
21 | | - <a |
22 | | - href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" |
23 | | - className="font-medium text-zinc-950 dark:text-zinc-50" |
24 | | - > |
25 | | - Templates |
26 | | - </a>{" "} |
27 | | - or the{" "} |
28 | | - <a |
29 | | - href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" |
30 | | - className="font-medium text-zinc-950 dark:text-zinc-50" |
31 | | - > |
32 | | - Learning |
33 | | - </a>{" "} |
34 | | - center. |
35 | | - </p> |
36 | | - </div> |
37 | | - <div className="flex flex-col gap-4 text-base font-medium sm:flex-row"> |
38 | | - <a |
39 | | - className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]" |
40 | | - href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" |
41 | | - target="_blank" |
42 | | - rel="noopener noreferrer" |
43 | | - > |
44 | | - <Image |
45 | | - className="dark:invert" |
46 | | - src="/vercel.svg" |
47 | | - alt="Vercel logomark" |
48 | | - width={16} |
49 | | - height={16} |
50 | | - /> |
51 | | - Deploy Now |
52 | | - </a> |
53 | | - <a |
54 | | - className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]" |
55 | | - href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" |
56 | | - target="_blank" |
57 | | - rel="noopener noreferrer" |
58 | | - > |
59 | | - Documentation |
60 | | - </a> |
| 10 | + <div className="min-h-screen bg-zinc-50 dark:bg-black"> |
| 11 | + <main className="container mx-auto px-4 py-16 max-w-7xl"> |
| 12 | + <div className="mb-12 text-center"> |
| 13 | + <Title level={1} variant="lg" className="mb-4"> |
| 14 | + Organizations |
| 15 | + </Title> |
| 16 | + <Text variant="md" color="text-zinc-600 dark:text-zinc-400"> |
| 17 | + Select an organization to view its dashboard and manage services |
| 18 | + </Text> |
61 | 19 | </div> |
| 20 | + |
| 21 | + {organizations.length === 0 ? ( |
| 22 | + <div className="text-center py-12"> |
| 23 | + <Text variant="md" color="text-zinc-500"> |
| 24 | + No organizations available |
| 25 | + </Text> |
| 26 | + </div> |
| 27 | + ) : ( |
| 28 | + <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> |
| 29 | + {organizations.map((org) => ( |
| 30 | + <OrganizationCard key={org.id} organization={org} /> |
| 31 | + ))} |
| 32 | + </div> |
| 33 | + )} |
62 | 34 | </main> |
63 | 35 | </div> |
64 | 36 | ); |
|
0 commit comments