From 722775cf25648ab76bb4ff9cecaa8a2d2466bb77 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Mon, 20 May 2024 18:29:56 +0200 Subject: [PATCH] Update sort parameter in getLatestScripts function to use "mostViewedPosition" instead of "created" --- components/MostViewedScripts.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/MostViewedScripts.tsx b/components/MostViewedScripts.tsx index 6f4887d..0a69e3f 100644 --- a/components/MostViewedScripts.tsx +++ b/components/MostViewedScripts.tsx @@ -20,7 +20,7 @@ export default function MostViewedScripts() { async function getLatestScripts() { try { const res = await pb.collection("proxmox_scripts").getList(1, 3, { - sort: "created", + sort: "mostViewedPosition", filter: "isMostViewed = true", }); setLatestScripts(res.items as unknown as Script[]);