From b83dc9777dd6fb99fc1a0d756fcd8918765be0f7 Mon Sep 17 00:00:00 2001 From: nuno-aac Date: Fri, 20 Oct 2023 09:44:24 +0100 Subject: [PATCH] Update jobs card --- workspaces/website/src/pages/jobs/JobsCard.tsx | 3 ++- workspaces/website/src/pages/jobs/JobsPage.tsx | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/workspaces/website/src/pages/jobs/JobsCard.tsx b/workspaces/website/src/pages/jobs/JobsCard.tsx index 85def9a99c3..1289730272c 100644 --- a/workspaces/website/src/pages/jobs/JobsCard.tsx +++ b/workspaces/website/src/pages/jobs/JobsCard.tsx @@ -1,5 +1,6 @@ import { ListCard } from "@ui/Card/ListCard"; import { JobsHit } from "./JobsPage"; +import moment from "moment"; export default function JobsCard({ hit }: { hit: JobsHit }) { let tags: string[] = []; @@ -10,7 +11,7 @@ export default function JobsCard({ hit }: { hit: JobsHit }) { return ( @@ -313,7 +316,9 @@ export type JobsHit = { }; function CustomHits() { - const { hits, showMore, isLastPage } = useInfiniteHits(); + const { hits, showMore, isLastPage } = useInfiniteHits({ + sortBy: ["published_at_ts:desc"], + }); return ( <>