mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix StateLabel doesn't render at first index
This commit is contained in:
@@ -11,12 +11,10 @@ const StateLabel = ({ commentIndex, className }) => {
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => setIsLoading(false), 2000);
|
||||
return () => clearTimeout(timer);
|
||||
}, []);
|
||||
|
||||
if (commentIndex === undefined) return null;
|
||||
}, [commentIndex]);
|
||||
|
||||
return (
|
||||
commentIndex && stateString !== "Succeeded" ? (
|
||||
commentIndex !== undefined && stateString !== "Succeeded" ? (
|
||||
(comment.state === "failed") ? (
|
||||
null
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user