diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index 3dbab29..231ed6d 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -112,6 +112,11 @@ export default function Page() { router.push(input) } + if (data.length === 1) { + // auto redirect if only one result + handleRedirect(`/document/view/${data[0].id}`) + } + return (