Revert "fix conditional useMemo"

This reverts commit df2e764808.
This commit is contained in:
plebeius.eth
2023-08-31 12:41:30 +02:00
parent ca216c8c9c
commit 572ce0869a
+5 -7
View File
@@ -1,14 +1,12 @@
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(() => {
// dont show state string if the data is already fetched
if (commentOrSubplebbit?.updatedAt || commentOrSubplebbit?.state === 'succeeded') {
return
}
if (!commentOrSubplebbit?.clients) {
return
}