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 [twilioSetupPopup, setTwilioSetupPopup] = useState(false)
|
||||||
|
|
||||||
const customInfoRequests =
|
const enabledCustomInfoRequests = R.pipe(
|
||||||
R.path(['customInfoRequests'])(customInfoReqData) ?? []
|
R.path(['customInfoRequests']),
|
||||||
const enabledCustomInfoRequests = R.filter(R.propEq('enabled', true))(
|
R.defaultTo([]),
|
||||||
customInfoRequests
|
R.filter(R.propEq('enabled', true))
|
||||||
)
|
)(customInfoReqData)
|
||||||
|
|
||||||
const emailAuth =
|
const emailAuth =
|
||||||
data?.config?.triggersConfig_customerAuthentication === 'EMAIL'
|
data?.config?.triggersConfig_customerAuthentication === 'EMAIL'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue