Skip to content
Snippets Groups Projects
Commit b78665d8 authored by Joao Ramia's avatar Joao Ramia
Browse files

Merge branch 'main' of gitlab.holi.team:app/holi-frontends into HOLI-11009-extend-button-props

parents d1d9a8b7 395a1f6b
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,9 @@ interface FlowData<T> {
submitType: Record<string, unknown>
}
// ory's openid connect group - we use custom buttons for this and ory's default buttons are filtered out
const ORY_OIDC_GROUP = 'oidc'
const FormBuilder = <
T extends UpdateSettingsFlowBody | UpdateLoginFlowBody | UpdateRegistrationFlowBody | UpdateRecoveryFlowBody,
>({
......@@ -155,24 +158,26 @@ const FormBuilder = <
{!flow ? (
<HoliLoader />
) : (
nodes.map((node: UiNode, index) => {
const name = getNodeId(node)
return (
<FormNode
key={`form-field-${flow?.ui.action || ''}-${name}-${index}`}
textInputOverride={textInputOverride}
translationPrefix={translationPrefix}
value={getValue(name)}
onChange={onChange(name)}
node={node}
onSubmitPress={() => onSubmit({ ...values, ...submitType })}
scrollToInputWithId={scrollToInputWithId}
autofocus={hasAutofocus(node)}
style={{ marginTop: Spacing.md }}
isSignin={isSignin}
/>
)
})
nodes
.filter((node) => node.group !== ORY_OIDC_GROUP)
.map((node: UiNode, index) => {
const name = getNodeId(node)
return (
<FormNode
key={`form-field-${flow?.ui.action || ''}-${name}-${index}`}
textInputOverride={textInputOverride}
translationPrefix={translationPrefix}
value={getValue(name)}
onChange={onChange(name)}
node={node}
onSubmitPress={() => onSubmit({ ...values, ...submitType })}
scrollToInputWithId={scrollToInputWithId}
autofocus={hasAutofocus(node)}
style={{ marginTop: Spacing.md }}
isSignin={isSignin}
/>
)
})
)}
</View>
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment