import React from 'react'import { useRouter } from 'next/router'import Maybe from 'front/Maybe'import { webApi } from 'front/api'import config from 'front/config'import CustomLink from 'front/CustomLink'import { cant } from 'front/cant'import { formatDate } from 'front/date'import UserLinkWithImage from 'front/UserLinkWithImage'const Comment = ({ comment, comments, id, loggedInUser, setComments }) => { const router = useRouter(); const { query: { number: issueNumber, slug }, } = router; const handleDelete = async (commentId) => { await webApi.commentDelete((slug as string[]).join('/'), issueNumber, comment.number) setComments(comments => comments.filter(comment => comment.id !== id)) }; const targetId = `comment${config.idSep}${comment.number}` return (