chore: remove middleware (#306)

#306
This commit is contained in:
Corbin Prebe 2024-11-24 22:41:48 -08:00
parent 3fb493f400
commit 1ce55e4091
2016 changed files with 23595 additions and 15662 deletions

View file

@ -1,65 +1,41 @@
import { Metadata } from "next"
import { Button } from "components/Button/Button"
import { LP_GRID_ITEMS } from "lp-items"
'use server'
export const metadata: Metadata = {
title: "Next.js Enterprise Boilerplate",
twitter: {
card: "summary_large_image",
},
openGraph: {
url: "https://next-enterprise.vercel.app/",
images: [
{
width: 1200,
height: 630,
url: "https://raw.githubusercontent.com/Blazity/next-enterprise/main/.github/assets/project-logo.png",
},
],
},
}
import { Database } from '../lib/database.types'
import { createClient } from '../lib/supabase/server'
import { ErrorBoundaryWrapper } from '../components/ErrorBoundaryWrapper'
type Todo = Database['public']['Tables']['todos']['Row']
export default async function Page() {
const supabase = createClient()
const { data: todos } = await supabase.from('todos').select('*').order('created_at', { ascending: false })
export default function Web() {
return (
<>
<section className="bg-white dark:bg-gray-900">
<div className="mx-auto grid max-w-screen-xl px-4 py-8 text-center lg:py-16">
<div className="mx-auto place-self-center">
<h1 className="mb-4 max-w-2xl text-4xl font-extrabold leading-none tracking-tight dark:text-white md:text-5xl xl:text-6xl">
Next.js Enterprise Boilerplate
</h1>
<p className="mb-6 max-w-2xl font-light text-gray-500 dark:text-gray-400 md:text-lg lg:mb-8 lg:text-xl">
Jumpstart your enterprise project with our feature-packed, high-performance Next.js boilerplate!
Experience rapid UI development, AI-powered code reviews, and an extensive suite of tools for a smooth and
enjoyable development process.
</p>
<Button href="https://github.com/Blazity/next-enterprise" className="mr-3">
Get started
</Button>
<Button
href="https://vercel.com/new/git/external?repository-url=https://github.com/Blazity/next-enterprise"
intent="secondary"
>
Deploy Now
</Button>
</div>
<ErrorBoundaryWrapper>
<main className="min-h-screen p-8">
<div className="max-w-3xl mx-auto">
<h1 className="text-2xl font-bold mb-6">Todos</h1>
{todos && todos.length > 0 ? (
<ul className="space-y-2" key="todo-list">
{(todos || []).map((todo: Todo) => (
<li
key={`todo-${todo.id}`}
className="p-4 bg-white shadow rounded-lg flex items-center gap-4"
>
<span className={todo.is_complete ? 'line-through text-gray-500' : ''}>
{todo.title}
</span>
<span className="text-xs text-gray-400">
{todo.created_at.split('T')[0]}
</span>
</li>
))}
</ul>
) : (
<p className="text-gray-500">No todos found</p>
)}
</div>
</section>
<section className="bg-white dark:bg-gray-900">
<div className="mx-auto max-w-screen-xl px-4 py-8 sm:py-16 lg:px-6">
<div className="justify-center space-y-8 md:grid md:grid-cols-2 md:gap-12 md:space-y-0 lg:grid-cols-3">
{LP_GRID_ITEMS.map((singleItem) => (
<div key={singleItem.title} className="flex flex-col items-center justify-center text-center">
<div className="mb-4 flex h-10 w-10 items-center justify-center rounded-full bg-primary-100 p-1.5 text-blue-700 dark:bg-primary-900 lg:h-12 lg:w-12">
{singleItem.icon}
</div>
<h3 className="mb-2 text-xl font-bold dark:text-white">{singleItem.title}</h3>
<p className="text-gray-500 dark:text-gray-400">{singleItem.description}</p>
</div>
))}
</div>
</div>
</section>
</>
</main>
</ErrorBoundaryWrapper>
)
}