remove expand method

This commit is contained in:
srgooglo 2022-10-11 13:00:55 +02:00
parent 82bb346a54
commit ab107f1b25

View File

@ -19,7 +19,6 @@ export default React.memo(({
fullmode fullmode
}) => { }) => {
const [loading, setLoading] = React.useState(true) const [loading, setLoading] = React.useState(true)
const [expanded, setExpanded] = React.useState(false)
const [likes, setLikes] = React.useState(data.likes ?? []) const [likes, setLikes] = React.useState(data.likes ?? [])
const [comments, setComments] = React.useState(data.comments ?? []) const [comments, setComments] = React.useState(data.comments ?? [])
@ -63,20 +62,6 @@ export default React.memo(({
return await events.onClickOpen(data) 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) => { const onDataUpdate = (data) => {
console.log("onDataUpdate", data) console.log("onDataUpdate", data)
@ -138,9 +123,7 @@ export default React.memo(({
{ ["liked"]: hasLiked }, { ["liked"]: hasLiked },
{ ["noHide"]: !expansibleActions }, { ["noHide"]: !expansibleActions },
{ ["fullmode"]: fullmode }, { ["fullmode"]: fullmode },
{ ["expanded"]: expanded }
)} )}
onClick={handleExpand}
> >
<div className="wrapper"> <div className="wrapper">
<PostHeader <PostHeader