Skip to content

Commit

Permalink
Merge pull request #1709 from zetkin/undocumented/create-tag-bug
Browse files Browse the repository at this point in the history
Fix bug where newly created tags were not added to store
  • Loading branch information
kaulfield23 authored Dec 14, 2023
2 parents 6bd68fe + 7536528 commit ce7b4cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/tags/hooks/useCreateTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ export default function useCreateTag(
});
return tagFuture;
} else {
dispatch(tagCreate());
const tagFuture = await apiClient
.post<ZetkinTag, ZetkinTagPostBody>(
`/api/orgs/${orgId}/people/tags`,
tag
)
.then((data: ZetkinTag) => {
// dispatch(tagGroupCreated);
dispatch(tagCreated(data));
return data;
});
return tagFuture;
Expand Down

0 comments on commit ce7b4cc

Please sign in to comment.