Skip to content

Commit

Permalink
Fixed decks page callstack overflowing, fetching replies
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed Sep 21, 2024
1 parent 65668de commit baeecc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/queries/get-discussions-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const getDiscussionsMapQuery = (entry: Entry | undefined, enabled: boolea
return {};
},
enabled: enabled && !!entry,
initialData: {}
refetchOnMount: true
});

export function addReplyToDiscussionsList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const DeckThreadItemBody = ({
});
renderVideos(renderAreaRef);
renderTweets(renderAreaRef);
}, [entry.parent_author, setRenderInitiated]);
}, [entry.parent_author]);

const renderContentBody = useCallback(() => {
if (entry.parent_author === "liketu.moments") {
Expand All @@ -83,7 +83,7 @@ export const DeckThreadItemBody = ({
if (!renderInitiated) {
renderBody();
}
}, [height, entry, onResize, renderBody, renderInitiated]);
}, [height, entry, renderBody, renderInitiated]);

return (
<div className="thread-item-body">
Expand Down

0 comments on commit baeecc6

Please sign in to comment.