diff --git a/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx b/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx index 37b9edabb..65e5436b7 100644 --- a/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx +++ b/frontend/src/views/DashboardPage/components/SecretInputRow/SecretInputRow.tsx @@ -110,7 +110,7 @@ export const SecretInputRow = memo( append } = useFieldArray({ control, name: `secrets.${index}.tags` }); - const colorByTagId = new Map((wsTags || []).map((wsTag, i) => [wsTag._id, tagColors[i % tagColors.length]])) + const tagColorByTagId = new Map((wsTags || []).map((wsTag, i) => [wsTag._id, tagColors[i % tagColors.length]])) // display the tags in alphabetical order secretTags.sort((a, b) => a.name.localeCompare(b.name)) @@ -328,7 +328,7 @@ export const SecretInputRow = memo(
{secretTags.map(({ id, _id, slug }, i) => { // This map lookup shouldn't ever fail, but if it does we default to the first color - const tagColor = colorByTagId.get(_id) || tagColors[0] + const tagColor = tagColorByTagId.get(_id) || tagColors[0] return ( { }} + onCheckedChange={() => {}} > - { } + {} } key={wsTag._id}