fix(usestatestring): don't show updating state if comment/subplebbit is succeeded

This commit is contained in:
Esteban Abaroa
2023-09-23 21:21:22 +00:00
parent 22300490ff
commit 7169366d11
+1 -1
View File
@@ -37,7 +37,7 @@ const useStateString = (commentOrSubplebbit) => {
}
// fallback to comment or subplebbit state when possible
if (!stateString) {
if (!stateString && commentOrSubplebbit?.state !== 'succeeded') {
if (commentOrSubplebbit?.publishingState && commentOrSubplebbit?.publishingState !== 'stopped' && commentOrSubplebbit?.publishingState !== 'succeeded') {
stateString = commentOrSubplebbit.publishingState;
} else if (commentOrSubplebbit?.updatingState !== 'stopped' && commentOrSubplebbit?.updatingState !== 'succeeded') {