mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
remove expand
method
This commit is contained in:
parent
82bb346a54
commit
ab107f1b25
@ -19,7 +19,6 @@ export default React.memo(({
|
||||
fullmode
|
||||
}) => {
|
||||
const [loading, setLoading] = React.useState(true)
|
||||
const [expanded, setExpanded] = React.useState(false)
|
||||
|
||||
const [likes, setLikes] = React.useState(data.likes ?? [])
|
||||
const [comments, setComments] = React.useState(data.comments ?? [])
|
||||
@ -63,20 +62,6 @@ export default React.memo(({
|
||||
return await events.onClickOpen(data)
|
||||
}
|
||||
|
||||
const toogleExpand = (to) => {
|
||||
if (to === undefined) {
|
||||
to = !expanded
|
||||
}
|
||||
|
||||
setExpanded(to)
|
||||
}
|
||||
|
||||
const handleExpand = () => {
|
||||
if (!expanded) {
|
||||
return toogleExpand(true)
|
||||
}
|
||||
}
|
||||
|
||||
const onDataUpdate = (data) => {
|
||||
console.log("onDataUpdate", data)
|
||||
|
||||
@ -138,9 +123,7 @@ export default React.memo(({
|
||||
{ ["liked"]: hasLiked },
|
||||
{ ["noHide"]: !expansibleActions },
|
||||
{ ["fullmode"]: fullmode },
|
||||
{ ["expanded"]: expanded }
|
||||
)}
|
||||
onClick={handleExpand}
|
||||
>
|
||||
<div className="wrapper">
|
||||
<PostHeader
|
||||
|
Loading…
x
Reference in New Issue
Block a user