Skip to content

Commit

Permalink
fix: show identifier_first node in card header
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Sep 25, 2024
1 parent fa98d7f commit 0878643
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ function constructCardHeaderText(container: FlowContainer) {
}
}

if (ui.nodes.find((node) => node.group === "identifier_first")) {
const identifier = ui.nodes.find(
(node) =>

Check warning on line 61 in packages/elements-react/src/theme/default/components/card/header.tsx

View check run for this annotation

Codecov / codecov/patch

packages/elements-react/src/theme/default/components/card/header.tsx#L60-L61

Added lines #L60 - L61 were not covered by tests
isUiNodeInputAttributes(node.attributes) &&
node.attributes.name.startsWith("identifier") &&
node.attributes.type !== "hidden",
)

if (identifier) {
parts.push(`your ${identifier.meta.label?.text}`)
}
}

switch (container.flowType) {
case FlowType.Login:
if (container.flow.refresh) {
Expand Down

0 comments on commit 0878643

Please sign in to comment.