From f35c2263ad81d585aa032f313e43e46f0c24c626 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Sat, 18 May 2024 22:09:36 +0200 Subject: [PATCH] Update query parameter in LatestScripts.tsx, Navbar.tsx, Script.tsx, and ScriptBrowser.tsx to use item title instead of item id --- components/LatestScripts.tsx | 2 +- components/Navbar.tsx | 2 +- components/Script.tsx | 2 +- components/ScriptBrowser.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/LatestScripts.tsx b/components/LatestScripts.tsx index d7f0bc8..36f99d3 100644 --- a/components/LatestScripts.tsx +++ b/components/LatestScripts.tsx @@ -59,7 +59,7 @@ function LatestScripts() { diff --git a/components/Navbar.tsx b/components/Navbar.tsx index d5eef47..8023f11 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -147,7 +147,7 @@ function Navbar() { diff --git a/components/Script.tsx b/components/Script.tsx index 7bd70ed..ba93a39 100644 --- a/components/Script.tsx +++ b/components/Script.tsx @@ -18,7 +18,7 @@ function ScriptItem() { const id = useSearchParams().get("id"); const getItem = async () => { - const res = await pb.collection("proxmox_scripts").getOne(`${id}`, {}); + const res = await pb.collection('proxmox_scripts').getFirstListItem(`title="${id}"`); setItem(res as unknown as Script); }; diff --git a/components/ScriptBrowser.tsx b/components/ScriptBrowser.tsx index fdbf0a7..aa8c586 100644 --- a/components/ScriptBrowser.tsx +++ b/components/ScriptBrowser.tsx @@ -90,7 +90,7 @@ const ScriptBrowser = () => {