From 541ee4ca01a8664021eac5c5ec01b675b143e02b Mon Sep 17 00:00:00 2001 From: nuno-aac Date: Fri, 20 Oct 2023 09:44:24 +0100 Subject: [PATCH 1/3] Update jobs card --- workspaces/website/src/pages/jobs/JobsCard.tsx | 3 ++- workspaces/website/src/pages/jobs/JobsPage.tsx | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/workspaces/website/src/pages/jobs/JobsCard.tsx b/workspaces/website/src/pages/jobs/JobsCard.tsx index 85def9a99c..1289730272 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 ( From 9729f1e78440b562b26c01d7801f0316bf86b379 Mon Sep 17 00:00:00 2001 From: nuno-aac Date: Fri, 20 Oct 2023 09:58:36 +0100 Subject: [PATCH 2/3] Update jobs sorting --- workspaces/cms-scripts/src/algolia.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workspaces/cms-scripts/src/algolia.ts b/workspaces/cms-scripts/src/algolia.ts index 234144fc48..bc7e350627 100644 --- a/workspaces/cms-scripts/src/algolia.ts +++ b/workspaces/cms-scripts/src/algolia.ts @@ -81,6 +81,12 @@ try { }) .wait(); } + + if (resourceName === "jobs") { + await index.setSettings({ + customRanking: ["desc(published_at_ts)"], + }); + } } } catch (err) { console.error(err); From e7861404bedb9de6329b77a0a4b772e42e741d0f Mon Sep 17 00:00:00 2001 From: nuno-aac Date: Fri, 20 Oct 2023 10:18:55 +0100 Subject: [PATCH 3/3] Fix page size --- workspaces/website/src/pages/jobs/JobsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/website/src/pages/jobs/JobsPage.tsx b/workspaces/website/src/pages/jobs/JobsPage.tsx index 1b69ac9ce2..f4cf259987 100644 --- a/workspaces/website/src/pages/jobs/JobsPage.tsx +++ b/workspaces/website/src/pages/jobs/JobsPage.tsx @@ -55,7 +55,7 @@ export function JobsPage({ params, env, seo }: Props): JSX.Element | null { indexName={`web_jobs_${env.ALGOLIA_INDEX}`} >