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
navigate to logged in repo when searching me
handle.invalid
5 months ago
ddf7050c
2e07016d
verified
This commit was signed with the committer's
known signature
.
handle.invalid
SSH Key Fingerprint:
SHA256:mBrT4x0JdzLpbVR95g1hjI1aaErfC02kmLRkPXwsYCk=
+12
-9
1 changed file
expand all
collapse all
unified
split
src
components
search.tsx
+12
-9
src/components/search.tsx
···
47
47
input = input.trim().replace(/^@/, "");
48
48
if (!input.length) return;
49
49
setShowSearch(false);
50
50
-
if (
50
50
+
if (input === "me" && localStorage.getItem("lastSignedIn") !== null) {
51
51
+
navigate(`/at://${localStorage.getItem("lastSignedIn")}`);
52
52
+
} else if (
51
53
!input.startsWith("https://bsky.app/") &&
52
54
(input.startsWith("https://") || input.startsWith("http://"))
53
55
) {
54
56
navigate(`/${input.replace("https://", "").replace("http://", "").replace("/", "")}`);
55
55
-
return;
57
57
+
} else {
58
58
+
const uri = input
59
59
+
.replace("at://", "")
60
60
+
.replace("https://bsky.app/profile/", "")
61
61
+
.replace("/post/", "/app.bsky.feed.post/");
62
62
+
const uriParts = uri.split("/");
63
63
+
navigate(
64
64
+
`/at://${uriParts[0]}${uriParts.length > 1 ? `/${uriParts.slice(1).join("/")}` : ""}`,
65
65
+
);
56
66
}
57
57
-
58
58
-
const uri = input
59
59
-
.replace("at://", "")
60
60
-
.replace("https://bsky.app/profile/", "")
61
61
-
.replace("/post/", "/app.bsky.feed.post/");
62
62
-
const uriParts = uri.split("/");
63
63
-
navigate(`/at://${uriParts[0]}${uriParts.length > 1 ? `/${uriParts.slice(1).join("/")}` : ""}`);
64
67
};
65
68
66
69
return (