atproto explorer pdsls.dev
atproto tool

dont use first typeahead result by default

juli.ee 0d3ad12b 37bb900a

verified
Changed files
+2 -2
src
components
+2 -2
src/components/search.tsx
···
const index = selectedIndex() >= 0 ? selectedIndex() : 0;
setShowSearch(false);
setInput(undefined);
-
setSelectedIndex(-1);
-
if (search()?.length) {
+
if (search()?.length && selectedIndex() !== -1) {
navigate(`/at://${search()![index].did}`);
} else if (input.startsWith("https://") || input.startsWith("http://")) {
const hostLength = input.indexOf("/", 8);
···
} else {
navigate(`/at://${input.replace("at://", "")}`);
}
+
setSelectedIndex(-1);
};
return (