From b75014633f0af52e9822c57d3e391863ea2aa228 Mon Sep 17 00:00:00 2001 From: Ben Bolte Date: Wed, 4 Sep 2024 21:06:06 -0700 Subject: [PATCH] listing fixes (#358) --- .../src/components/listing/ListingBody.tsx | 24 +++++++++---------- .../listing/artifacts/ArtifactCard.tsx | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/listing/ListingBody.tsx b/frontend/src/components/listing/ListingBody.tsx index 4a7004d6..0b4b1a72 100644 --- a/frontend/src/components/listing/ListingBody.tsx +++ b/frontend/src/components/listing/ListingBody.tsx @@ -96,15 +96,15 @@ const ListingBody = (props: ListingBodyProps) => { edit={listing.can_edit} />
- {artifacts === null ? ( - - ) : ( - - {artifacts + + {artifacts === null ? ( + + ) : ( + artifacts .slice() .reverse() .map((artifact) => ( @@ -115,9 +115,9 @@ const ListingBody = (props: ListingBodyProps) => { canEdit={listing.can_edit} />
- ))} - - )} + )) + )} + ); diff --git a/frontend/src/components/listing/artifacts/ArtifactCard.tsx b/frontend/src/components/listing/artifacts/ArtifactCard.tsx index 2b2b12ea..d6ffebf6 100644 --- a/frontend/src/components/listing/artifacts/ArtifactCard.tsx +++ b/frontend/src/components/listing/artifacts/ArtifactCard.tsx @@ -18,7 +18,7 @@ interface Props { } const ArtifactCard: React.FC = ({ artifact, onDelete, canEdit }) => { - const createdAt = new Date(artifact.timestamp); + const createdAt = new Date(artifact.timestamp * 1000); const formattedDate = format(createdAt, "MMM d, yyyy 'at' h:mm a"); const [deleting, setDeleting] = useState(false); const { addErrorAlert, addAlert } = useAlertQueue();