Archived
Rewrite as a Spring Boot app on the Bennett platform
build-and-publish / build (push) Successful in 1m38s
build-and-publish / build (push) Successful in 1m38s
Restores the real backend lost with Supabase (posts, authors, comments, subscriptions, admin) in Postgres, seeds the existing markdown posts, and rebuilds the site as a Vite/React SPA served by Spring — keeping the original styling (serif + tan accent) and content. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { getPosts } from '../api';
|
||||
import { useAsync } from '../lib/useAsync';
|
||||
import PostCard from '../components/PostCard';
|
||||
|
||||
export default function PostsPage() {
|
||||
const { data: posts, loading } = useAsync(() => getPosts(), []);
|
||||
const list = posts ?? [];
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-5xl">
|
||||
<h1 className="mb-6 text-3xl font-bold md:text-4xl">Archive</h1>
|
||||
<p className="mb-10 text-lg text-primary-700">Every post, newest first.</p>
|
||||
{loading && <p className="text-primary-500">Loading…</p>}
|
||||
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||
{list.map((post) => <PostCard key={post.slug} post={post} />)}
|
||||
</div>
|
||||
{!loading && list.length === 0 && <p className="text-primary-500">No posts yet.</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user