fix: Hide spinner after page creation failure
@@ -353,8 +353,6 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
createFromPageTree: true,
});
- setCreating(false);
-
mutateChildren();
if (!hasDescendants) {
@@ -366,6 +364,9 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
catch (err) {
toastError(err);
}
+ finally {
+ setCreating(false);
+ }
};
const inputValidator = (title: string | null): AlertInfo | null => {