diff --git a/src/components/StateLabel.jsx b/src/components/StateLabel.jsx
index 079e28a0..86a73fb9 100644
--- a/src/components/StateLabel.jsx
+++ b/src/components/StateLabel.jsx
@@ -1,28 +1,27 @@
import React from "react";
-import { useComment } from "@plebbit/plebbit-react-hooks";
+import { useAccountComment } from "@plebbit/plebbit-react-hooks";
import useStateString from "../hooks/useStateString";
+import useGeneralStore from "../hooks/stores/useGeneralStore";
const StateLabel = ({ commentCid, className }) => {
- const comment = useComment({commentCid});
+ const { pendingCommentIndex } = useGeneralStore(state => state);
+
+ const comment = useAccountComment({commentIndex: pendingCommentIndex});
const stateString = useStateString(comment);
return (
- comment.state === "succeeded" ? null : (
- comment.state === "initializing" ? null : (
-
- <>
-
- (
-
- {stateString}
-
- )
- >
-
- )
- )
- )
+ !commentCid && stateString !== "Succeeded" ? (
+
+
+ (
+
+ {stateString}
+
+ )
+
+ ) : null
+ );
};
export default StateLabel;
\ No newline at end of file