refactor(HandleTag): streamline tag submission logic

- Simplified the payload construction for tag creation and updates in the HandleTag component.
- Improved code readability by consolidating the conditional logic for tagId handling.
This commit is contained in:
Mauricio Siu
2026-03-19 01:37:55 -06:00
parent 7f60000641
commit bd18461242

View File

@@ -99,7 +99,7 @@ export const HandleTag = ({ tagId }: HandleTagProps) => {
await mutateAsync({
name: data.name,
color: data.color,
...(tagId && { tagId }),
tagId: tagId || "",
})
.then(async () => {
await utils.tag.all.invalidate();