atproto explorer

cleanup search logic

+1 -8
+1 -8
src/components/search.tsx
··· 44 44 }); 45 45 46 46 const processInput = async (input: string) => { 47 - (document.getElementById("uriForm") as HTMLFormElement).reset(); 48 - input = input 49 - .trim() 50 - .replace(/\u202c$/, "") 51 - .replace(/^\u202a/, "") 52 - .replace(/^@/, ""); 47 + input = input.trim().replace(/^@/, ""); 53 48 if (!input.length) return; 54 49 setShowSearch(false); 55 50 if ( 56 51 !input.startsWith("https://bsky.app/") && 57 - !input.startsWith("https://deer.social/") && 58 52 (input.startsWith("https://") || input.startsWith("http://")) 59 53 ) { 60 54 navigate(`/${input.replace("https://", "").replace("http://", "").replace("/", "")}`); ··· 63 57 64 58 const uri = input 65 59 .replace("at://", "") 66 - .replace("https://deer.social/profile/", "") 67 60 .replace("https://bsky.app/profile/", "") 68 61 .replace("/post/", "/app.bsky.feed.post/"); 69 62 const uriParts = uri.split("/");