atproto explorer

dont use first typeahead result by default

handle.invalid 0d3ad12b 37bb900a

verified
+2 -2
+2 -2
src/components/search.tsx
··· 73 const index = selectedIndex() >= 0 ? selectedIndex() : 0; 74 setShowSearch(false); 75 setInput(undefined); 76 - setSelectedIndex(-1); 77 - if (search()?.length) { 78 navigate(`/at://${search()![index].did}`); 79 } else if (input.startsWith("https://") || input.startsWith("http://")) { 80 const hostLength = input.indexOf("/", 8); ··· 96 } else { 97 navigate(`/at://${input.replace("at://", "")}`); 98 } 99 }; 100 101 return (
··· 73 const index = selectedIndex() >= 0 ? selectedIndex() : 0; 74 setShowSearch(false); 75 setInput(undefined); 76 + if (search()?.length && selectedIndex() !== -1) { 77 navigate(`/at://${search()![index].did}`); 78 } else if (input.startsWith("https://") || input.startsWith("http://")) { 79 const hostLength = input.indexOf("/", 8); ··· 95 } else { 96 navigate(`/at://${input.replace("at://", "")}`); 97 } 98 + setSelectedIndex(-1); 99 }; 100 101 return (