From 34ecfdbb972c6cab618513afe8c2a50c7d33da4d Mon Sep 17 00:00:00 2001 From: matty Date: Sat, 14 Feb 2026 00:09:49 +0000 Subject: [PATCH] uoohh uhh im so fukn retarded durr --- actions.ts | 27 +++++++++++++++++---------- app/page.tsx | 2 +- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/actions.ts b/actions.ts index 8fcca60..fc479a9 100644 --- a/actions.ts +++ b/actions.ts @@ -41,17 +41,24 @@ const getRandomResultFromGCI = async ( }; const lmgcitfy = async (query: string): Promise> => { - if (!query) { - return { error: true, errorMessage: "You must provide a search query." }; + try { + if (!query) { + return { error: true, errorMessage: "You must provide a search query." }; + } + + const searchParams = new URLSearchParams(); + + searchParams.append("query", query); + + const redirectURL = `https://guncadindex.com/search?${searchParams}`; + + return { error: false, payload: redirectURL }; + } catch (error) { + if (error instanceof Error) { + console.error(error.message); + } + return { error: true, errorMessage: "Something went wrong." }; } - - const searchParams = new URLSearchParams(); - - searchParams.append("query", query); - - const redirectURL = `https://guncadindex.com/search?${searchParams}`; - - return { error: false, payload: redirectURL }; }; export { getRandomResultFromGCI, lmgcitfy }; diff --git a/app/page.tsx b/app/page.tsx index 1011c97..2ad8fe9 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -112,7 +112,7 @@ export default function Home() { setTimeout(() => { buttonRef.current!.style.scale = `1`; - }, 2350); + }, 1750); setTimeout(() => { toaster.create({