({content})
| 189 | } |
| 190 | |
| 191 | function LikeButton({content}) { |
| 192 | return ( |
| 193 | <Form method="post" style={{display: 'inline-flex', alignItems: 'center', gap: '0.25rem'}}> |
| 194 | <input type="hidden" name="ContentID" value={content.id}/> |
| 195 | <Tooltip title={content.liked ? "取消点赞" : "点赞"} arrow> |
| 196 | <IconButton type="submit" name="ActionType" value="ToggleLike" color={content.liked ? "error" : "default"}> |
| 197 | {content.liked ? <Favorite/> : <FavoriteBorder/>} |
| 198 | </IconButton> |
| 199 | </Tooltip> |
| 200 | <Typography variant="body2">{content.like_count}</Typography> |
| 201 | </Form> |
| 202 | ); |
| 203 | } |
| 204 | |
| 205 | function CommentForm({parentId, placeholder, onSubmitted}) { |
| 206 | const [content, setContent] = useState(""); |
nothing calls this directly
no outgoing calls
no test coverage detected