From d50babaf3626a005cae4387cf0c2b46e56312282 Mon Sep 17 00:00:00 2001 From: Tyler <26290074+thegitduck@users.noreply.github.com> Date: Tue, 11 Mar 2025 22:03:53 -0700 Subject: [PATCH] layout --- src/components/search.tsx | 13 ++++++------- src/pages/_layout.tsx | 4 ++-- src/pages/index.tsx | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/search.tsx b/src/components/search.tsx index a138822..cddb36e 100644 --- a/src/components/search.tsx +++ b/src/components/search.tsx @@ -30,6 +30,7 @@ export const Searcher = () => { query: string; }>({ results: [], query: "" }); const searchInputRef = useRef(null); + const listboxRef = useRef(null); const { data: search, @@ -61,9 +62,7 @@ export const Searcher = () => { } if ( document.activeElement !== searchInputRef.current && - ((e.metaKey && e.key === "k") || !e.metaKey) && - !e.ctrlKey && - !e.altKey + ((e.metaKey && e.key === "k") || e.key === "/") ) { e.preventDefault(); searchInputRef.current?.focus(); @@ -91,7 +90,7 @@ export const Searcher = () => { return ( <> {/* Logo, title and search section */} -
+
RSS Quest Koala {
{/* Search results */} -
+
{isLoading ? (
Loading search index... @@ -134,11 +133,11 @@ export const Searcher = () => {
) : results.results.length > 0 ? ( console.log(key)} > {results.results.map((result) => ( - -
{children}
+ +
{children}