mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-29 04:47:24 +00:00
format code
This commit is contained in:
@@ -46,7 +46,7 @@ export default function CommentPage() {
|
||||
|
||||
const onUpdated = useCallback(() => {
|
||||
setComment(null);
|
||||
const id = parseInt(commentId || "0");
|
||||
const id = parseInt(commentId || "0");
|
||||
if (isNaN(id) || id <= 0) {
|
||||
showToast({
|
||||
message: t("Invalid comment ID"),
|
||||
@@ -116,11 +116,11 @@ export default function CommentPage() {
|
||||
<CommentContent content={comment.content} />
|
||||
</article>
|
||||
{app.user?.id === comment.user.id && (
|
||||
<div className="flex flex-row justify-end mt-2">
|
||||
<EditCommentDialog comment={comment} onUpdated={onUpdated} />
|
||||
<DeleteCommentDialog commentId={comment.id} onUpdated={onDeleted} />
|
||||
</div>
|
||||
)}
|
||||
<div className="flex flex-row justify-end mt-2">
|
||||
<EditCommentDialog comment={comment} onUpdated={onUpdated} />
|
||||
<DeleteCommentDialog commentId={comment.id} onUpdated={onDeleted} />
|
||||
</div>
|
||||
)}
|
||||
<div className="h-4" />
|
||||
<div className="border-t border-base-300" />
|
||||
<div className="h-4" />
|
||||
@@ -282,7 +282,6 @@ function CommentsList({
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function EditCommentDialog({
|
||||
comment,
|
||||
onUpdated,
|
||||
@@ -460,4 +459,4 @@ function DeleteCommentDialog({
|
||||
</dialog>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user