Skip to content

Commit e938a25

Browse files
fix: tree view label page titles (#5943)
* Fix tree view page titles * update for legacy forms that may have label instead of label.name --------- Co-authored-by: Tim Arney <timarney@users.noreply.github.com>
1 parent 6f0f633 commit e938a25

File tree

1 file changed

+6
-2
lines changed
  • app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/logic/components/flow

1 file changed

+6
-2
lines changed

app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/logic/components/flow/GroupNode.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export const GroupNode = (node: NodeProps) => {
100100
"absolute right-[-20px] top-[-20px] cursor-pointer outline-offset-8 outline-slate-800 hover:scale-125 rounded-full"
101101
)}
102102
>
103-
<QuestionRuleSvg title={t("groups.editPage", { name: node.data.label.name })} />
103+
<QuestionRuleSvg
104+
title={t("groups.editPage", { name: node.data.label || node.data.label?.name })}
105+
/>
104106
</button>
105107
)}
106108
{!node.data.children.length && <div className="min-h-[50px] min-w-[200px]"></div>}
@@ -175,7 +177,9 @@ export const GroupNode = (node: NodeProps) => {
175177
)}
176178
</div>
177179
<div className="absolute right-10px top-[6px] cursor-pointer hover:scale-125">
178-
<OptionRuleSvg title={t("groups.editRules", { name: node.data.label.name })} />
180+
<OptionRuleSvg
181+
title={t("groups.editRules", { name: node.data.label || node.data.label?.name })}
182+
/>
179183
</div>
180184
</button>
181185
);

0 commit comments

Comments
 (0)