refactor: code refactor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export function EmptyState() {
|
||||
return (
|
||||
<div className="mt-5 flex flex-col items-center">
|
||||
<div className="mt-5 mx-5 flex flex-col items-center">
|
||||
<div className="mb-5 font-bold">
|
||||
I haven't post anything yet! So here's a pic of my cat
|
||||
</div>
|
||||
|
@@ -3,11 +3,11 @@ import { Link } from "@remix-run/react";
|
||||
type PostProps = {
|
||||
filename: string;
|
||||
title: string;
|
||||
publishedAt: string;
|
||||
published: string;
|
||||
description: string | null;
|
||||
};
|
||||
|
||||
export function Post({ title, description, filename, publishedAt }: PostProps) {
|
||||
export function Post({ title, description, filename, published }: PostProps) {
|
||||
return (
|
||||
<div className="mx-5 md:mx-0 md:w-1/2 lg:w-1/3">
|
||||
<div className="p-5 border-gray-600 border-2 rounded-lg">
|
||||
@@ -17,7 +17,7 @@ export function Post({ title, description, filename, publishedAt }: PostProps) {
|
||||
{title}
|
||||
</span>
|
||||
<span className="ml-2">{`(${new Date(
|
||||
publishedAt
|
||||
published
|
||||
).toLocaleDateString()})`}</span>
|
||||
</div>
|
||||
{description && (
|
||||
|
Reference in New Issue
Block a user