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
Showing only changes of commit 224960a11f - Show all commits

View File

@ -170,6 +170,9 @@ export default function Text({
}
if (element.type === "media" && element.mimeType?.startsWith("image")) {
if (i > 0) {
chunks.push(<div className="mt10" />);
mmalmi marked this conversation as resolved Outdated

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?

Yea probably best to use css actually

Yea probably best to use css actually
}
if (disableMedia ?? false) {
chunks.push(<DisableMedia content={element.content} />);
} else {
@ -231,6 +234,9 @@ export default function Text({
element.type === "media" &&
(element.mimeType?.startsWith("audio") || element.mimeType?.startsWith("video"))
) {
if (i > 0) {
chunks.push(<div className="mt10" />);
}
if (disableMedia ?? false) {
chunks.push(<DisableMedia content={element.content} />);
} else {
@ -247,6 +253,9 @@ export default function Text({
chunks.push(<CashuNuts token={element.content} />);
}
if (element.type === "link" || (element.type === "media" && element.mimeType?.startsWith("unknown"))) {
if (i > 0 && !disableLinkPreview) {
chunks.push(<div className="mt10" />);
}
chunks.push(
<HyperText link={element.content} depth={depth} showLinkPreview={!(disableLinkPreview ?? false)} />,
);