diff --git a/src/components/UniversalPostRenderer.tsx b/src/components/UniversalPostRenderer.tsx
index 4abf0ea..c0e7996 100644
--- a/src/components/UniversalPostRenderer.tsx
+++ b/src/components/UniversalPostRenderer.tsx
@@ -306,12 +306,13 @@ export function UniversalPostRendererATURILoader({
filterMustBeReply={filterMustBeReply}
/>
<>
- {maxReplies && maxReplies === 0 && replies && replies > 0 ? (
+ {maxReplies !== undefined && maxReplies === 0 && replies && replies > 0 ? (
<>
>
) : (
- <>>
+ <>
+ >
)}
>
{!isQuote && oldestOpsReplyElseNewestNonOpsReply && (
@@ -354,7 +355,7 @@ function MoreReplies({ atUri }: { atUri: string }) {
params: { did: aturio.host, rkey: aturio.rkey },
})
}
- className="border-b border-gray-300 dark:border-gray-800 flex flex-row px-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-900 transition-colors"
+ className="border-b border-gray-200 dark:border-gray-800 flex flex-row px-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-900 transition-colors"
>
{
if (!mainPost?.value?.reply?.parent?.uri) {
setParents([]);
@@ -418,7 +420,7 @@ export function ProfilePostComponent({
let ignore = false;
const fetchParents = async () => {
setParentsLoading(true);
- const parentChain: any[] = [];
+ const parentChain: ({uri: string;cid: string;value: any;} | undefined)[] = [];
let currentParentUri = mainPost?.value.reply?.parent.uri;
const MAX_PARENTS = 25;
let safetyCounter = 0;
@@ -433,6 +435,14 @@ export function ProfilePostComponent({
currentParentUri = parentPost.value?.reply?.parent?.uri;
} catch (error) {
console.error("Failed to fetch a parent post:", error);
+ // its okay to always add one invalid parent then stop
+ if (currentParentUri){
+ parentChain.push({
+ uri: currentParentUri,
+ cid: "sorry",
+ value: "sorry",
+ })
+ }
break;
}
safetyCounter++;
@@ -499,7 +509,7 @@ export function ProfilePostComponent({
0}
+ topReplyLine={parentsLoading || parents.length > 0 || !!directparent}
nopics={!!nopics}
lightboxCallback={lightboxCallback}
/>