mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 00:38:49 +01:00
Fix userInitiated undefined
This commit is contained in:
parent
d3e3e47527
commit
fe78ac5fa0
1 changed files with 9 additions and 4 deletions
|
@ -304,6 +304,9 @@ function StatusPage({ id }) {
|
||||||
<SubComments
|
<SubComments
|
||||||
hasManyStatuses={hasManyStatuses}
|
hasManyStatuses={hasManyStatuses}
|
||||||
replies={replies}
|
replies={replies}
|
||||||
|
onStatusLinkClick={() => {
|
||||||
|
userInitiated.current = true;
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{uiState === 'loading' &&
|
{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
|
// If less than or 2 replies and total number of characters of content from replies is less than 500
|
||||||
let isBrief = false;
|
let isBrief = false;
|
||||||
if (replies.length <= 2) {
|
if (replies.length <= 2) {
|
||||||
|
@ -365,9 +372,7 @@ function SubComments({ hasManyStatuses, replies }) {
|
||||||
<Link
|
<Link
|
||||||
class="status-link"
|
class="status-link"
|
||||||
href={`#/s/${replyID}`}
|
href={`#/s/${replyID}`}
|
||||||
onClick={() => {
|
onClick={onStatusLinkClick}
|
||||||
userInitiated.current = true;
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Status statusID={replyID} withinContext size="s" />
|
<Status statusID={replyID} withinContext size="s" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
Loading…
Reference in a new issue