From 1ef9452af095dc5f8789ef48ffa6cc196fcb836f Mon Sep 17 00:00:00 2001 From: Syed Hisham Akmal Date: Sat, 21 Oct 2023 22:57:48 +0530 Subject: [PATCH 1/2] Fixed the issue of interactivity when loader appears --- src/component/Assets/Loader.css | 11 +++++++++++ src/component/Assets/Loader.jsx | 29 +++++++++++++++++------------ 2 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 src/component/Assets/Loader.css diff --git a/src/component/Assets/Loader.css b/src/component/Assets/Loader.css new file mode 100644 index 0000000..5d2e14d --- /dev/null +++ b/src/component/Assets/Loader.css @@ -0,0 +1,11 @@ +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */ + z-index: 9999; /* Ensure it's on top of other elements */ + pointer-events: all; /* Disable pointer events to block interactions */ + } + \ No newline at end of file diff --git a/src/component/Assets/Loader.jsx b/src/component/Assets/Loader.jsx index 68a294f..21974f9 100644 --- a/src/component/Assets/Loader.jsx +++ b/src/component/Assets/Loader.jsx @@ -1,22 +1,27 @@ -import React, { useEffect } from "react"; +import React from "react"; import { Spinner } from "react-bootstrap"; +import "./Loader.css" -const Loader = ({ time, loading }) => { +const Loader = () => { return ( <> - + + }} + /> + + ); }; export default Loader; + From fdf872181f07d275fce7f0eb7a0e98c57931f2a4 Mon Sep 17 00:00:00 2001 From: Syed Hisham Akmal Date: Sat, 21 Oct 2023 22:58:26 +0530 Subject: [PATCH 2/2] Minor change --- src/component/Assets/Loader.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/Assets/Loader.jsx b/src/component/Assets/Loader.jsx index 21974f9..c37e06d 100644 --- a/src/component/Assets/Loader.jsx +++ b/src/component/Assets/Loader.jsx @@ -2,7 +2,7 @@ import React from "react"; import { Spinner } from "react-bootstrap"; import "./Loader.css" -const Loader = () => { +const Loader = ({ time, loading}) => { return ( <>