Profile urls, scrollbar, ProfilePage refactoring #646

Merged
mmalmi merged 10 commits from mmalmi/snort:main into main 2023-10-09 18:41:32 +00:00
Collaborator
No description provided.
mmalmi added 3 commits 2023-10-08 08:12:08 +00:00
Author
Collaborator

Actually this has a problem which sometimes seems to prevent back-navigation from /username

Actually this has a problem which sometimes seems to prevent back-navigation from /username
mmalmi added 1 commit 2023-10-08 12:28:21 +00:00
continuous-integration/drone/pr Build is failing Details
5ed096509a
use DisplayName on profile page
mmalmi added 1 commit 2023-10-08 13:22:20 +00:00
mmalmi added 1 commit 2023-10-08 13:40:37 +00:00
continuous-integration/drone/pr Build is failing Details
224960a11f
add spacing before media and link embeds
mmalmi force-pushed main from a518970289 to 224960a11f 2023-10-08 13:53:23 +00:00 Compare
Author
Collaborator

Should work now. It's returning note & profile components directly from NostrLinkHandler instead of redirecting.

Should work now. It's returning note & profile components directly from NostrLinkHandler instead of redirecting.
Kieran reviewed 2023-10-09 09:00:17 +00:00
@ -0,0 +143,4 @@
const replaceWith = (username: string) => {
const current = window.location.pathname;
const npub = hexToBech32(NostrPrefix.PublicKey, user?.pubkey);
if (current.endsWith(`/${npub}`)) {
Owner

you should be able to use navigate(`/${username`, { replace: true });

you should be able to use ```navigate(`/${username`, { replace: true });```
Author
Collaborator

perfect!

perfect!
mmalmi marked this conversation as resolved
@ -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(/^_@/, ""));
Owner

Probably dont want this, people can still use their nip5 directly though if they wanted

Probably dont want this, people can still use their nip5 directly though if they wanted
mmalmi marked this conversation as resolved
@ -0,0 +156,4 @@
// replaceWith(user.nip05?.replace(/^_@/, ""));
}
}
}, [isVerified, user?.pubkey]);
Owner

isVerified not used?

`isVerified` not used?
mmalmi marked this conversation as resolved
fernandoporazzi reviewed 2023-10-09 09:03:33 +00:00
@ -171,2 +171,4 @@
if (element.type === "media" && element.mimeType?.startsWith("image")) {
if (i > 0) {
chunks.push(<div className="mt10" />);
Contributor

This is just for margin top? Can't we control that without adding an empty div?

This is just for margin top? Can't we control that without adding an empty div?
Owner

Yea probably best to use css actually

Yea probably best to use css actually
mmalmi marked this conversation as resolved
fernandoporazzi reviewed 2023-10-09 09:26:07 +00:00
@ -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 || "");
Contributor

We could change this hook on packages/app/src/Element/User/Nip05.tsx and make the pubkey param optional.

By doing so, we can avoid that OR operator when calling the hook.

We could change this hook on `packages/app/src/Element/User/Nip05.tsx` and make the `pubkey` param optional. By doing so, we can avoid that **OR** operator when calling the hook.
Author
Collaborator

done

done
mmalmi marked this conversation as resolved
mmalmi added 1 commit 2023-10-09 12:46:06 +00:00
continuous-integration/drone/pr Build is failing Details
79ef147023
simpler profile url nip05 replacement
mmalmi added 1 commit 2023-10-09 12:58:11 +00:00
continuous-integration/drone/pr Build is failing Details
dbaad8bbb3
make useIsVerified pubkey param optional
mmalmi added 1 commit 2023-10-09 13:06:54 +00:00
continuous-integration/drone/pr Build is failing Details
15fb4cabdf
css selector based margin-top
Kieran approved these changes 2023-10-09 15:37:40 +00:00
mmalmi added 1 commit 2023-10-09 16:13:02 +00:00
continuous-integration/drone/pr Build is passing Details
b59c5685f9
Merge remote-tracking branch 'kieran/main'
mmalmi merged commit c023a89271 into main 2023-10-09 18:41:32 +00:00
Sign in to join this conversation.
No description provided.