点赞数

This commit is contained in:
wangtianqi 2024-10-31 14:33:12 +08:00
parent 72e7d51398
commit bb3f949a4a
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,8 @@ const EssayDetails = (
const { item, cover, isSelfLiked } = props.data; const { item, cover, isSelfLiked } = props.data;
const [showScrollTop, setShowScrollTop] = useState(false); const [showScrollTop, setShowScrollTop] = useState(false);
const { likeCount } = props.data;
useEffect(() => { useEffect(() => {
const handleScroll = () => { const handleScroll = () => {
if (window.scrollY > 300) { if (window.scrollY > 300) {
@ -97,6 +99,7 @@ const EssayDetails = (
) : ( ) : (
<OakIcon name='praise' size={25} /> <OakIcon name='praise' size={25} />
)} )}
<span>{likeCount}</span>
</div> </div>
</div> </div>
<MdViewer md={item.content!} /> <MdViewer md={item.content!} />