fix: response delete in single response card (#1624)

This commit is contained in:
Dhruwang Jariwala
2023-11-16 18:28:32 +05:30
committed by GitHub
parent 9242ab3a7d
commit 6727ccf1cd

View File

@@ -255,17 +255,15 @@ export default function SingleResponseCard({
{timeSince(response.updatedAt.toISOString())}
</time>
{!isViewer && (
<TooltipRenderer
shouldRender={isSubmissionFresh || !response.finished}
tooltipContent={deleteSubmissionToolTip}>
<TooltipRenderer shouldRender={isSubmissionFresh} tooltipContent={deleteSubmissionToolTip}>
<TrashIcon
onClick={() => {
if (!isSubmissionFresh || !response.finished) {
if (!isSubmissionFresh) {
setDeleteDialogOpen(true);
}
}}
className={`h-4 w-4 ${
isSubmissionFresh || !response.finished
isSubmissionFresh
? "cursor-not-allowed text-gray-400"
: "text-slate-500 hover:text-red-700"
} `}