Skip to content

πŸ†™ Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.

Add loading

Nayam Amarshe4a580905bfa3
diff --git a/renderer/pages/index.tsx b/renderer/pages/index.tsx
index 2bb5273..1e5f0be 100644
--- a/renderer/pages/index.tsx
+++ b/renderer/pages/index.tsx
@@ -54,6 +54,7 @@ const Home = () => {
const [dontShowCloudModal, setDontShowCloudModal] = useAtom(
dontShowCloudModalAtom
);
+ const [isLoading, setIsLoading] = useState(true);
const [showCloudModal, setShowCloudModal] = useState(false);
@@ -246,6 +247,10 @@ const Home = () => {
}
}, [imagePath]);
+ useEffect(() => {
+ setIsLoading(false);
+ }, []);
+
const resetImagePaths = () => {
logit("πŸ”„ Resetting image paths");
@@ -471,7 +476,7 @@ const Home = () => {
const allowedFileTypes = ["png", "jpg", "jpeg", "webp"];
- if (typeof window === "undefined") {
+ if (isLoading) {
return (
<img
src="icon.png"