diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index 5bf920f1..ca8bfc3f 100644 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -426,7 +426,7 @@ const Board = () => { ) : null} {commentMediaInfo?.type === "video" ? ( - {/* { const img = document.querySelector(`img[key="img-${thread.cid}"]`); @@ -434,12 +434,12 @@ const Board = () => { img.src = thumbnail; } }} - /> */} + /> ) : null} {commentMediaInfo?.type === "audio" ? ( - {/* ) : null} @@ -721,7 +721,7 @@ const Board = () => { ) : commentMediaInfo.type === "video" ? (
- {/* { const img = document.querySelector(`img[key="img-${thread.cid}"]`); @@ -729,14 +729,14 @@ const Board = () => { img.src = thumbnail; } }} - /> */} + />
{commentMediaInfo.type}
) : commentMediaInfo.type === "audio" ? (
- {/*
diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index 8a0c4f60..a7b9e6fe 100644 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -45,9 +45,7 @@ const Catalog = () => { const { subplebbitAddress } = useParams(); const handleClickForm = useClickForm(); - useEffect(() => { - console.log(feed); - }, [feed]); + useEffect(() => { setSelectedAddress(subplebbitAddress); diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index 4e45f169..ed8a6eb4 100644 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -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 = () => {
- {comment ? ( + {comment !== undefined ? ( <>