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
});
45
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(/^@/, "");
53
if (!input.length) return;
54
setShowSearch(false);
55
if (
56
!input.startsWith("https://bsky.app/") &&
57
-
!input.startsWith("https://deer.social/") &&
58
(input.startsWith("https://") || input.startsWith("http://"))
59
) {
60
navigate(`/${input.replace("https://", "").replace("http://", "").replace("/", "")}`);
···
63
64
const uri = input
65
.replace("at://", "")
66
-
.replace("https://deer.social/profile/", "")
67
.replace("https://bsky.app/profile/", "")
68
.replace("/post/", "/app.bsky.feed.post/");
69
const uriParts = uri.split("/");
···
44
});
45
46
const processInput = async (input: string) => {
47
+
input = input.trim().replace(/^@/, "");
0
0
0
0
0
48
if (!input.length) return;
49
setShowSearch(false);
50
if (
51
!input.startsWith("https://bsky.app/") &&
0
52
(input.startsWith("https://") || input.startsWith("http://"))
53
) {
54
navigate(`/${input.replace("https://", "").replace("http://", "").replace("/", "")}`);
···
57
58
const uri = input
59
.replace("at://", "")
0
60
.replace("https://bsky.app/profile/", "")
61
.replace("/post/", "/app.bsky.feed.post/");
62
const uriParts = uri.split("/");