refactor: simplify enabled custom info requests processing
This commit is contained in:
parent
f1566c1bcc
commit
08c87f4f18
1 changed files with 6 additions and 5 deletions
|
|
@ -73,11 +73,12 @@ const Triggers = () => {
|
|||
|
||||
const [twilioSetupPopup, setTwilioSetupPopup] = useState(false)
|
||||
|
||||
const customInfoRequests =
|
||||
R.path(['customInfoRequests'])(customInfoReqData) ?? []
|
||||
const enabledCustomInfoRequests = R.filter(R.propEq('enabled', true))(
|
||||
customInfoRequests
|
||||
)
|
||||
const enabledCustomInfoRequests = R.pipe(
|
||||
R.path(['customInfoRequests']),
|
||||
R.defaultTo([]),
|
||||
R.filter(R.propEq('enabled', true))
|
||||
)(customInfoReqData)
|
||||
|
||||
const emailAuth =
|
||||
data?.config?.triggersConfig_customerAuthentication === 'EMAIL'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue