aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-08 17:41:59 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commitfd44e344b1b97ad75623796cbe2066fa72d17e37 (patch)
treef4d26d210f7dda42c5ca05a7eb2bb352012fdd7b /vnext/src
parent0729e5c052dceca39e227b14536f2a26580a1bf9 (diff)
Thread fixes
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/components/Message.js8
-rw-r--r--vnext/src/components/Thread.js4
2 files changed, 7 insertions, 5 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js
index 6c78b4bc..c8435a1e 100644
--- a/vnext/src/components/Message.js
+++ b/vnext/src/components/Message.js
@@ -50,9 +50,11 @@ export default function Message({ data, visitor, children, ...rest }) {
}
{
data.photo &&
- <p className="ir"><a href={`//i.juick.com/p/${data.mid}.${data.attach}`} data-fname={`${data.mid}.${data.attach}`}>
- <img src={`//i.juick.com/photos-512/${data.mid}.${data.attach}`} alt="" /></a>
- </p>
+ <div className="msg-media">
+ <a href={`//i.juick.com/p/${data.mid}.${data.attach}`} data-fname={`${data.mid}.${data.attach}`}>
+ <img src={`//i.juick.com/photos-512/${data.mid}.${data.attach}`} alt="" />
+ </a>
+ </div>
}
<div className="embedContainer" ref={embedRef} />
<nav className="l">
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js
index 3fa0ce10..1dd7d3cc 100644
--- a/vnext/src/components/Thread.js
+++ b/vnext/src/components/Thread.js
@@ -16,7 +16,7 @@ import { format, embedUrls } from '../utils/embed';
import { getMessages, comment, markReadTracker } from '../api';
-function Comment({ msg, visitor, active, setActive }) {
+function Comment({ msg, visitor, active, setActive, postComment }) {
const embedRef = useRef();
const msgRef = useRef();
useEffect(() => {
@@ -142,7 +142,7 @@ export default function Thread(props) {
{
!loading ? replies.map((msg) => (
<li id={msg.rid} key={msg.rid} className="msg">
- <Comment msg={msg} visitor={props.visitor} active={active} setActive={setActive} />
+ <Comment msg={msg} visitor={props.visitor} active={active} setActive={setActive} postComment={postComment} />
</li>
)) : (
<>