aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Thread.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-28 17:13:55 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commitafd233dd69aae355256578130c9f545bf749f2b1 (patch)
tree6420fcf135a32ba57e048e2c0b493901ad742100 /vnext/src/ui/Thread.js
parent617f6c7a668af8139377b12079554e6e21e9a637 (diff)
Fix loading thread state
Diffstat (limited to 'vnext/src/ui/Thread.js')
-rw-r--r--vnext/src/ui/Thread.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js
index 0f0f88e3..5c9412d6 100644
--- a/vnext/src/ui/Thread.js
+++ b/vnext/src/ui/Thread.js
@@ -21,7 +21,7 @@ const emptyMessage = {};
export default function Thread(props) {
const location = useLocation();
const params = useParams();
- const [message, setMessage] = useState((location.state || {}).msg || {});
+ const [message, setMessage] = useState((location.state || {}).data || {});
const [replies, setReplies] = useState([]);
const [loading, setLoading] = useState(false);
const [active, setActive] = useState(0);
@@ -112,7 +112,7 @@ export default function Thread(props) {
<Comment msg={msg} draft={msg.rid === editing.replyto ? editing.body : ''} visitor={props.visitor} active={active} setActive={setActive} onStartEditing={startEditing} postComment={postComment} />
</li>
)) : (
- <>
+ <>
{
Array(loaders).fill().map((it, i) => <Spinner key={i} />)
}