mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix useComment
This commit is contained in:
@@ -44,13 +44,17 @@ const Thread = () => {
|
||||
const navigate = useNavigate();
|
||||
const [prevScrollPos, setPrevScrollPos] = useState(0);
|
||||
const [visible, setVisible] = useState(true);
|
||||
const comment = useComment({selectedThread});
|
||||
const comment = useComment({commentCid: selectedThread});
|
||||
const { subplebbitAddress, threadCid } = useParams();
|
||||
const handleClickForm = useClickForm();
|
||||
|
||||
const commentMediaInfo = getCommentMediaInfo(comment);
|
||||
const fallbackImgUrl = "/assets/filedeleted-res.gif";
|
||||
|
||||
// useEffect(() => {
|
||||
// console.log(comment);
|
||||
// }, [comment]);
|
||||
|
||||
|
||||
// temporary title from JSON, gets subplebbitAddress and threadCid from URL
|
||||
useEffect(() => {
|
||||
@@ -390,7 +394,7 @@ const Thread = () => {
|
||||
<hr />
|
||||
</TopBar>
|
||||
<BoardForm selectedStyle={selectedStyle}>
|
||||
{comment ? (
|
||||
{comment !== undefined ? (
|
||||
<>
|
||||
<div className="thread">
|
||||
<div className="op-container">
|
||||
|
||||
Reference in New Issue
Block a user