Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Loading indicator was deactivated (#2879)

Oleg Isonencd4faac416e5
diff --git a/apps/builder/app/dashboard/shared/spinner/spinner.tsx b/apps/builder/app/dashboard/shared/spinner/spinner.tsx
index 690ccb6b93..7dd5a8b133 100644
--- a/apps/builder/app/dashboard/shared/spinner/spinner.tsx
+++ b/apps/builder/app/dashboard/shared/spinner/spinner.tsx
@@ -1,6 +1,7 @@
import { css } from "@webstudio-is/design-system";
import { useDebounce } from "use-debounce";
import { SpinnerIcon } from "@webstudio-is/icons";
+import { useEffect } from "react";
const containerStyle = css({
position: "absolute",
@@ -22,12 +23,12 @@ export const Spinner = ({
}) => {
const [isVisible, setIsVisible] = useDebounce(false, delay);
- if (delay !== 0) {
+ useEffect(() => {
setIsVisible(true);
- }
+ }, [setIsVisible]);
if (isVisible === false) {
- return null;
+ return;
}
return (