refactor: code refactor

This commit is contained in:
Andrea
2024-02-05 19:03:39 +01:00
parent 2e879d9c00
commit fa60885d85
7 changed files with 38 additions and 14 deletions

View File

@@ -16,13 +16,13 @@ export const loader = () => {
export default function () {
const posts = useLoaderData<typeof loader>();
return (
<>
<div className="space-y-5">
<Title>Here I blog about whatever get my attention</Title>
{posts.length > 0 ? (
posts.map((post, i) => <Post {...post} key={i} />)
) : (
<EmptyState />
)}
</>
</div>
);
}