Profile urls, scrollbar, ProfilePage refactoring #646
No reviewers
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#646
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mmalmi/snort:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Actually this has a problem which sometimes seems to prevent back-navigation from /username
a518970289
to224960a11f
Should work now. It's returning note & profile components directly from NostrLinkHandler instead of redirecting.
@ -0,0 +143,4 @@
const replaceWith = (username: string) => {
const current = window.location.pathname;
const npub = hexToBech32(NostrPrefix.PublicKey, user?.pubkey);
if (current.endsWith(`/${npub}`)) {
you should be able to use
navigate(`/${username`, { replace: true });
perfect!
@ -0,0 +153,4 @@
replaceWith(username);
} else {
// do we want this? would need to support urls with dots like /fiatjaf.com
// replaceWith(user.nip05?.replace(/^_@/, ""));
Probably dont want this, people can still use their nip5 directly though if they wanted
@ -0,0 +156,4 @@
// replaceWith(user.nip05?.replace(/^_@/, ""));
}
}
}, [isVerified, user?.pubkey]);
isVerified
not used?@ -171,2 +171,4 @@
if (element.type === "media" && element.mimeType?.startsWith("image")) {
if (i > 0) {
chunks.push(<div className="mt10" />);
This is just for margin top? Can't we control that without adding an empty div?
Yea probably best to use css actually
@ -0,0 +69,4 @@
const [modalImage, setModalImage] = useState<string>("");
const aboutText = user?.about || "";
const npub = !id?.startsWith(NostrPrefix.PublicKey) ? hexToBech32(NostrPrefix.PublicKey, id || undefined) : id;
const { isVerified } = useIsVerified(user?.pubkey || "");
We could change this hook on
packages/app/src/Element/User/Nip05.tsx
and make thepubkey
param optional.By doing so, we can avoid that OR operator when calling the hook.
done