Skip to content

Commit

Permalink
III-5746 - Also use hiddenLabels for showing cultuurkuur tab on organ…
Browse files Browse the repository at this point in the history
…izer form
  • Loading branch information
brampauwelyn committed Oct 11, 2023
1 parent 67537b1 commit b808661
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pages/organizers/create/OrganizerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,17 @@ const OrganizerForm = () => {
// @ts-expect-error
const organizer = getOrganizerByIdQuery?.data;

const organizerLabels = organizer?.labels;
const organizerLabelsSet = new Set();

(organizer?.labels ?? []).map((label: string) =>
organizerLabelsSet.add(label),
);

(organizer?.hiddenLabels ?? []).map((label: string) =>
organizerLabelsSet.add(label),
);

const organizerLabels = [...organizerLabelsSet];

const createOrganizerMutation = useCreateOrganizerMutation();
const updateOrganizerMutation = useUpdateOrganizerMutation();
Expand Down

0 comments on commit b808661

Please sign in to comment.