diff --git a/package-lock.json b/package-lock.json index 9a0deaebe..05f0dbc0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,13 +33,11 @@ "react-helmet": "^6.1.0", "react-hot-toast": "^2.4.1", "react-icons": "^5.2.1", - "react-loader-spinner": "^6.1.6", "react-redux": "^9.1.2", "react-responsive-carousel": "^3.2.23", "react-router-dom": "^6.26.0", "react-slick": "^0.30.2", "react-spinners": "^0.14.1", - "react-top-loading-bar": "^2.3.1", "react-use": "^17.5.0", "sitemap": "^8.0.0", "slick-carousel": "^1.8.1", @@ -13754,28 +13752,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, - "node_modules/react-loader-spinner": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/react-loader-spinner/-/react-loader-spinner-6.1.6.tgz", - "integrity": "sha512-x5h1Jcit7Qn03MuKlrWcMG9o12cp9SNDVHVJTNRi9TgtGPKcjKiXkou4NRfLAtXaFB3+Z8yZsVzONmPzhv2ErA==", - "license": "MIT", - "dependencies": { - "react-is": "^18.2.0", - "styled-components": "^6.1.2" - }, - "engines": { - "node": ">= 12" - }, - "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/react-loader-spinner/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, "node_modules/react-redux": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.2.tgz", @@ -13880,17 +13856,6 @@ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-top-loading-bar": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/react-top-loading-bar/-/react-top-loading-bar-2.3.1.tgz", - "integrity": "sha512-rQk2Nm+TOBrM1C4E3e6KwT65iXyRSgBHjCkr2FNja1S51WaPulRA5nKj/xazuQ3x89wDDdGsrqkqy0RBIfd0xg==", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": "^16 || ^17 || ^18" - } - }, "node_modules/react-universal-interface": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/react-universal-interface/-/react-universal-interface-0.6.2.tgz", diff --git a/package.json b/package.json index 1f1c18906..4a6bbf2dc 100644 --- a/package.json +++ b/package.json @@ -36,13 +36,11 @@ "react-helmet": "^6.1.0", "react-hot-toast": "^2.4.1", "react-icons": "^5.2.1", - "react-loader-spinner": "^6.1.6", "react-redux": "^9.1.2", "react-responsive-carousel": "^3.2.23", "react-router-dom": "^6.26.0", "react-slick": "^0.30.2", "react-spinners": "^0.14.1", - "react-top-loading-bar": "^2.3.1", "react-use": "^17.5.0", "sitemap": "^8.0.0", "slick-carousel": "^1.8.1", diff --git a/src/User/UserLayout.jsx b/src/User/UserLayout.jsx index d151a9f00..8f6d7165f 100644 --- a/src/User/UserLayout.jsx +++ b/src/User/UserLayout.jsx @@ -6,29 +6,17 @@ import Footer from "./components/Footer/Footer"; import GoToTop from "./components/GoToTop/gototop"; import ScrollProgressBar from "./components/progressbar/ScrollProgressBar"; import FeedbackButton from "./components/FeedbackForm/FeedBtn"; -import Loader from "./components/progressbar/Loader"; + const UserLayout = () => { - const [loading, setLoading] = useState(true); const location = useLocation(); // Determine which navbar to show based on the current route const isAdminRoute = location.pathname.startsWith("/admin"); - // Simulate page loading - useEffect(() => { - const loadPage = async () => { - // Simulate page load delay - await new Promise(resolve => setTimeout(resolve, 3000)); // 3-second delay - setLoading(false); // Hide loader after page is loaded - }; - - loadPage(); - }, []); - return ( <> {isAdminRoute ? : } - {/*set to true to manage state as needed */} +