import { createSignal, Show } from "solid-js"; import type { EditCommentModalProps } from "~/types/comment"; import Xmark from "~/components/icons/Xmark"; export default function EditCommentModal(props: EditCommentModalProps) { let bodyRef: HTMLTextAreaElement | undefined; const [showNoChange, setShowNoChange] = createSignal(false); const editCommentWrapper = (e: SubmitEvent) => { e.preventDefault(); if ( bodyRef && bodyRef.value.length > 0 && bodyRef.value !== props.commentBody ) { setShowNoChange(false); props.editComment(bodyRef.value, props.commentID); } else { setShowNoChange(true); } }; return (
Edit Comment