fix: loading state when creating template
This commit is contained in:
@@ -59,6 +59,8 @@ function useCreateTemplate() {
|
|||||||
description: string;
|
description: string;
|
||||||
baseTemplate: string;
|
baseTemplate: string;
|
||||||
}): Promise<Template | null> => {
|
}): Promise<Template | null> => {
|
||||||
|
setIsCreating(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetchApi(`/templates/${name}`, {
|
const res = await fetchApi(`/templates/${name}`, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
|
Reference in New Issue
Block a user