always focus search bar #11

merged
opened by kilroy.bluecanary.dev targeting main from kilroy.bluecanary.dev/pdsls: main

imo it's really nice usability-wise to not have to click on the search bar when loading the site specifically to paste in a url

Changed files
+2 -2
src
components
+2 -2
src/components/search.tsx
··· 1 1 import { Client, CredentialManager } from "@atcute/client"; 2 - import { A, useLocation, useNavigate } from "@solidjs/router"; 2 + import { A, useNavigate } from "@solidjs/router"; 3 3 import { createResource, createSignal, For, onCleanup, onMount, Show } from "solid-js"; 4 4 import { isTouchDevice } from "../layout"; 5 5 import { appHandleLink, appList, appName, AppUrl } from "../utils/app-urls"; ··· 47 47 }); 48 48 49 49 onMount(() => { 50 - if (useLocation().pathname !== "/") searchInput.focus(); 50 + searchInput.focus(); 51 51 }); 52 52 53 53 const fetchTypeahead = async (input: string) => {