mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 21:45:17 +00:00
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:
@@ -99,7 +99,7 @@ export const HandleTag = ({ tagId }: HandleTagProps) => {
|
|||||||
await mutateAsync({
|
await mutateAsync({
|
||||||
name: data.name,
|
name: data.name,
|
||||||
color: data.color,
|
color: data.color,
|
||||||
...(tagId && { tagId }),
|
tagId: tagId || "",
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await utils.tag.all.invalidate();
|
await utils.tag.all.invalidate();
|
||||||
|
|||||||
Reference in New Issue
Block a user