mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-20 02:30:18 -05:00
fixes sonarqube medium issue
This commit is contained in:
@@ -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"
|
||||
)}>
|
||||
|
||||
Reference in New Issue
Block a user