From f5ba1465bfa53d797cff4ed5692b6441c0fca981 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 9 Jan 2025 17:18:05 +0530 Subject: [PATCH] chore: lint --- .../DisplayWhereConditionSettings.tsx | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/components/molecules/DisplayWhereConditionSettings.tsx b/src/components/molecules/DisplayWhereConditionSettings.tsx index 98d63459..6068e124 100644 --- a/src/components/molecules/DisplayWhereConditionSettings.tsx +++ b/src/components/molecules/DisplayWhereConditionSettings.tsx @@ -12,15 +12,15 @@ interface DisplayConditionSettingsProps { setAdditionalSettings: (value: any) => void; newValue: any; setNewValue: (value: any) => void; - keyValueFormRef: React.RefObject<{getObject: () => object}>; + keyValueFormRef: React.RefObject<{ getObject: () => object }>; whereKeys: string[]; checked: boolean[]; setChecked: (value: boolean[]) => void; } export const DisplayConditionSettings = ( - {whereProp, setAdditionalSettings, additionalSettings, - setNewValue, newValue, keyValueFormRef, whereKeys, checked, setChecked} + { whereProp, setAdditionalSettings, additionalSettings, + setNewValue, newValue, keyValueFormRef, whereKeys, checked, setChecked } : DisplayConditionSettingsProps) => { switch (whereProp) { case 'url': @@ -34,7 +34,7 @@ export const DisplayConditionSettings = ( string regex - { additionalSettings ? setNewValue(e.target.value)} @@ -56,20 +56,20 @@ export const DisplayConditionSettings = ( ...newValue.slice(0, index), e.target.value, ...newValue.slice(index + 1) - ])}/> + ])} /> }) } - setNewValue([...newValue, ''])}/> - { + setNewValue([...newValue, ''])} /> + { const arr = newValue; arr.splice(-1); setNewValue([...arr]); - }}/> + }} /> ) case 'cookies': - return + return case 'before': return or - { - whereKeys.map((key: string, index: number) => { - return ( - setChecked([ - ...checked.slice(0, index), - !checked[index], - ...checked.slice(index + 1) - ])} - key={`checkbox-${key}-${index}`} - /> - } label={key} key={`control-label-form-${key}-${index}`}/> - ) - }) - } + { + whereKeys.map((key: string, index: number) => { + return ( + setChecked([ + ...checked.slice(0, index), + !checked[index], + ...checked.slice(index + 1) + ])} + key={`checkbox-${key}-${index}`} + /> + } label={key} key={`control-label-form-${key}-${index}`} /> + ) + }) + } Choose at least 2 where conditions. Nesting of boolean operators