From 1fd4a6ae80d86ab78eb0e50ba99067ab61cde54a Mon Sep 17 00:00:00 2001 From: Tuluobo Date: Tue, 13 Aug 2024 19:38:09 +0800 Subject: [PATCH] refactor: close dialog after selected template --- apps/dokploy/components/dashboard/project/add-template.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx index 0e55aac9..40a1d670 100644 --- a/apps/dokploy/components/dashboard/project/add-template.tsx +++ b/apps/dokploy/components/dashboard/project/add-template.tsx @@ -55,6 +55,7 @@ interface Props { export const AddTemplate = ({ projectId }: Props) => { const [query, setQuery] = useState(""); + const [open, setOpen] = useState(false); const { data } = api.compose.templates.useQuery(); const [selectedTags, setSelectedTags] = useState([]); const { data: tags, isLoading: isLoadingTags } = @@ -75,7 +76,7 @@ export const AddTemplate = ({ projectId }: Props) => { }) || []; return ( - + { utils.project.one.invalidate({ projectId, }); + setOpen(false); }) .catch(() => { toast.error(