fixes sonarqube medium issue

This commit is contained in:
pandeymangg
2025-11-21 15:48:08 +05:30
parent 7de5fdc383
commit ae165eac87

View File

@@ -425,6 +425,13 @@ export const BlockCard = ({
const blockQuestionCount = block.elements.length;
const blockQuestionCountText = blockQuestionCount === 1 ? "question" : "questions";
let blockSidebarColorClass = "";
if (isBlockInvalid) {
blockSidebarColorClass = "bg-red-400";
} else {
blockSidebarColorClass = isBlockOpen ? "bg-slate-700" : "bg-slate-400";
}
return (
<div
className={cn(
@@ -438,7 +445,8 @@ export const BlockCard = ({
{...listeners}
{...attributes}
className={cn(
isBlockInvalid ? "bg-red-400" : isBlockOpen ? "bg-slate-700" : "bg-slate-400",
// isBlockInvalid ? "bg-red-400" : isBlockOpen ? "bg-slate-700" : "bg-slate-400",
blockSidebarColorClass,
"top-0 w-10 rounded-l-lg p-2 text-center text-sm text-white hover:cursor-grab hover:bg-slate-600",
"flex flex-col items-center justify-between gap-2"
)}>