From 08169e6ad8bb8c2158098319955b5d9efe1d0e60 Mon Sep 17 00:00:00 2001 From: akash Date: Mon, 8 Dec 2025 13:07:51 +0530 Subject: [PATCH] empty loading issue has been fixed --- package-lock.json | 19 ++++++++++++++- package.json | 6 ++--- public/web.config | 43 ++++++++++++++++++++++++++++++++++ scripts/copy-htaccess.cjs | 18 -------------- scripts/copy-server-config.cjs | 30 ++++++++++++++++++++++++ src/app/globals.css | 19 +++++++++++++++ src/app/loading.tsx | 15 ++++++++++++ 7 files changed, 128 insertions(+), 22 deletions(-) create mode 100644 public/web.config delete mode 100644 scripts/copy-htaccess.cjs create mode 100644 scripts/copy-server-config.cjs create mode 100644 src/app/loading.tsx diff --git a/package-lock.json b/package-lock.json index 1542d82..949a826 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "react-dom": "19.2.0", "react-google-recaptcha": "^3.1.0", "react-icons": "^5.5.0", - "selenium-webdriver": "^4.38.0", "sitemap": "^9.0.0", "xml2js": "^0.6.2" }, @@ -26,6 +25,7 @@ "@types/react-google-recaptcha": "^2.1.9", "eslint": "^9", "eslint-config-next": "16.0.3", + "selenium-webdriver": "^4.38.0", "typescript": "^5" } }, @@ -273,6 +273,7 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/@bazel/runfiles/-/runfiles-6.5.0.tgz", "integrity": "sha512-RzahvqTkfpY2jsDxo8YItPX+/iZ6hbiikw1YhE0bA9EKBR5Og8Pa6FHn9PO9M0zaXRVsr0GFQLKbB/0rzy9SzA==", + "dev": true, "license": "Apache-2.0" }, "node_modules/@emnapi/core": { @@ -2427,6 +2428,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, "license": "MIT" }, "node_modules/cross-spawn": { @@ -3778,6 +3780,7 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true, "license": "MIT" }, "node_modules/import-fresh": { @@ -3811,6 +3814,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, "license": "ISC" }, "node_modules/internal-slot": { @@ -4361,6 +4365,7 @@ "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dev": true, "license": "(MIT OR GPL-3.0-or-later)", "dependencies": { "lie": "~3.3.0", @@ -4417,6 +4422,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, "license": "MIT", "dependencies": { "immediate": "~3.0.5" @@ -4860,6 +4866,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true, "license": "(MIT AND Zlib)" }, "node_modules/parent-module": { @@ -4973,6 +4980,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, "license": "MIT" }, "node_modules/prop-types": { @@ -5089,6 +5097,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", @@ -5104,6 +5113,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, "license": "MIT" }, "node_modules/reflect.getprototypeof": { @@ -5250,6 +5260,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, "license": "MIT" }, "node_modules/safe-push-apply": { @@ -5303,6 +5314,7 @@ "version": "4.38.0", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.38.0.tgz", "integrity": "sha512-5/UXXFSQmn7FGQkbcpAqvfhzflUdMWtT7QqpEgkFD6Q6rDucxB5EUfzgjmr6JbUj30QodcW3mDXehzoeS/Vy5w==", + "dev": true, "funding": [ { "type": "github", @@ -5387,6 +5399,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true, "license": "MIT" }, "node_modules/sharp": { @@ -5614,6 +5627,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" @@ -5856,6 +5870,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.14" @@ -6153,6 +6168,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, "license": "MIT" }, "node_modules/which": { @@ -6274,6 +6290,7 @@ "version": "8.18.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "dev": true, "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index b645b54..ca8be82 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build && node scripts/copy-htaccess.cjs", + "build": "next build && node scripts/copy-server-config.cjs", "start": "next start", "lint": "eslint", "sitemap": "node scripts/generate-sitemap.cjs" @@ -17,7 +17,6 @@ "react-dom": "19.2.0", "react-google-recaptcha": "^3.1.0", "react-icons": "^5.5.0", - "selenium-webdriver": "^4.38.0", "sitemap": "^9.0.0", "xml2js": "^0.6.2" }, @@ -28,6 +27,7 @@ "@types/react-google-recaptcha": "^2.1.9", "eslint": "^9", "eslint-config-next": "16.0.3", - "typescript": "^5" + "typescript": "^5", + "selenium-webdriver": "^4.38.0" } } \ No newline at end of file diff --git a/public/web.config b/public/web.config new file mode 100644 index 0000000..71ac777 --- /dev/null +++ b/public/web.config @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/copy-htaccess.cjs b/scripts/copy-htaccess.cjs deleted file mode 100644 index 366a94d..0000000 --- a/scripts/copy-htaccess.cjs +++ /dev/null @@ -1,18 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -// Copy .htaccess from public to out directory after build -const source = path.join(__dirname, '..', 'public', '.htaccess'); -const destination = path.join(__dirname, '..', 'out', '.htaccess'); - -try { - if (fs.existsSync(source)) { - fs.copyFileSync(source, destination); - console.log('✓ .htaccess copied to out directory'); - } else { - console.warn('⚠ .htaccess not found in public directory'); - } -} catch (error) { - console.error('Error copying .htaccess:', error.message); - process.exit(1); -} diff --git a/scripts/copy-server-config.cjs b/scripts/copy-server-config.cjs new file mode 100644 index 0000000..a10734b --- /dev/null +++ b/scripts/copy-server-config.cjs @@ -0,0 +1,30 @@ +const fs = require('fs'); +const path = require('path'); + +// Configuration +const PUBLIC_DIR = path.join(__dirname, '..', 'public'); +const OUT_DIR = path.join(__dirname, '..', 'out'); +const FILES_TO_COPY = ['.htaccess', 'web.config']; + +// Ensure out directory exists +if (!fs.existsSync(OUT_DIR)) { + console.warn('⚠ out directory does not exist. Make sure "next build" (static export) has run.'); + process.exit(1); +} + +FILES_TO_COPY.forEach(filename => { + const source = path.join(PUBLIC_DIR, filename); + const destination = path.join(OUT_DIR, filename); + + try { + if (fs.existsSync(source)) { + fs.copyFileSync(source, destination); + console.log(`✓ ${filename} copied to out directory`); + } else { + console.warn(`⚠ ${filename} not found in public directory`); + } + } catch (error) { + console.error(`Error copying ${filename}:`, error.message); + process.exit(1); + } +}); diff --git a/src/app/globals.css b/src/app/globals.css index e47aace..37bcfa9 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -270,4 +270,23 @@ h2 { --body-size: 14px; --small-text-size: 13px; } +} + +/* Loading Spinner */ +.loader { + border: 4px solid #1a1a1a; + border-top: 4px solid var(--color-button); /* Using existing gold/button color */ + border-radius: 50%; + width: 40px; + height: 40px; + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } } \ No newline at end of file diff --git a/src/app/loading.tsx b/src/app/loading.tsx new file mode 100644 index 0000000..f215389 --- /dev/null +++ b/src/app/loading.tsx @@ -0,0 +1,15 @@ +export default function Loading() { + return ( +
+
+
+ ); +}