Skip to content

Commit

Permalink
listing fixes (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas authored Sep 5, 2024
1 parent 602ad98 commit b750146
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions frontend/src/components/listing/ListingBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ const ListingBody = (props: ListingBodyProps) => {
edit={listing.can_edit}
/>
<div className="mt-4">
{artifacts === null ? (
<LoadingArtifactCard />
) : (
<Masonry
breakpointCols={breakpointColumnsObj}
className="flex w-auto -ml-4"
columnClassName="pl-4 bg-clip-padding"
>
{artifacts
<Masonry
breakpointCols={breakpointColumnsObj}
className="flex w-auto -ml-4"
columnClassName="pl-4 bg-clip-padding"
>
{artifacts === null ? (
<LoadingArtifactCard />
) : (
artifacts
.slice()
.reverse()
.map((artifact) => (
Expand All @@ -115,9 +115,9 @@ const ListingBody = (props: ListingBodyProps) => {
canEdit={listing.can_edit}
/>
</div>
))}
</Masonry>
)}
))
)}
</Masonry>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/listing/artifacts/ArtifactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Props {
}

const ArtifactCard: React.FC<Props> = ({ 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();
Expand Down

0 comments on commit b750146

Please sign in to comment.