tangled
alpha
login
or
join now
vielle.dev
/
pdsls
forked from
pds.ls/pdsls
0
fork
atom
atproto explorer
0
fork
atom
overview
issues
pulls
pipelines
cleanup search logic
handle.invalid
6 months ago
fa059b5c
5b1bf5ca
+1
-8
1 changed file
expand all
collapse all
unified
split
src
components
search.tsx
+1
-8
src/components/search.tsx
···
44
44
});
45
45
46
46
const processInput = async (input: string) => {
47
47
-
(document.getElementById("uriForm") as HTMLFormElement).reset();
48
48
-
input = input
49
49
-
.trim()
50
50
-
.replace(/\u202c$/, "")
51
51
-
.replace(/^\u202a/, "")
52
52
-
.replace(/^@/, "");
47
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
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
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("/");