fix state string bug

This commit is contained in:
Esteban Abaroa
2023-08-28 20:26:14 +00:00
parent e86336da08
commit 8d9d556f7d
+5
View File
@@ -1,6 +1,11 @@
import { useMemo } from 'react'
const useStateString = (commentOrSubplebbit) => {
// dont show state string if the data is already fetched
if (commentOrSubplebbit?.updatedAt || commentOrSubplebbit?.state === 'succeeded') {
return
}
return useMemo(() => {
if (!commentOrSubplebbit?.clients) {
return