From fe78ac5fa08a815243af0b0d83520b9b876c55a0 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 23 Dec 2022 12:30:07 +0800 Subject: [PATCH] Fix userInitiated undefined --- src/pages/status.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/status.jsx b/src/pages/status.jsx index dc01aafc..aef35975 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -304,6 +304,9 @@ function StatusPage({ id }) { { + userInitiated.current = true; + }} /> )} {uiState === 'loading' && @@ -339,7 +342,11 @@ function StatusPage({ id }) { ); } -function SubComments({ hasManyStatuses, replies }) { +function SubComments({ + hasManyStatuses, + replies, + onStatusLinkClick = () => {}, +}) { // If less than or 2 replies and total number of characters of content from replies is less than 500 let isBrief = false; if (replies.length <= 2) { @@ -365,9 +372,7 @@ function SubComments({ hasManyStatuses, replies }) { { - userInitiated.current = true; - }} + onClick={onStatusLinkClick} >