From bd258e1f6a88969dfa4b3204305934914ac35463 Mon Sep 17 00:00:00 2001 From: swayamName1 Date: Tue, 21 May 2024 22:41:13 +0530 Subject: [PATCH] manageFaq scss and loader fix --- .../Components/Faq/ManageFaq/ManageFaq.jsx | 29 +++++++------------ .../Faq/ManageFaq/manage-faq.module.scss | 17 ++++++----- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/frontend/src/pages/Admin/Components/Faq/ManageFaq/ManageFaq.jsx b/frontend/src/pages/Admin/Components/Faq/ManageFaq/ManageFaq.jsx index ca746359..18350e22 100644 --- a/frontend/src/pages/Admin/Components/Faq/ManageFaq/ManageFaq.jsx +++ b/frontend/src/pages/Admin/Components/Faq/ManageFaq/ManageFaq.jsx @@ -16,7 +16,6 @@ export function ManageFaq(props) { const [faqs, setFaqs] = useState([]); const [expanded, setExpanded] = useState(false); const [isFetching, setIsFetching] = useState(true); - const [loading, setLoading] = useState(false); const [open, setOpenToast] = useState(false); const [toastMessage, setToastMessage] = useState(""); const [severity, setSeverity] = useState("success"); @@ -43,7 +42,7 @@ export function ManageFaq(props) { } const deleteFaq = async (faqId) => { - setLoading(true); + setIsFetching(true); const url = `${END_POINT}/deleteFaq`; const body = { userId: props.adminData._id, @@ -71,7 +70,7 @@ export function ManageFaq(props) { setOpenToast(true); setSeverity("error"); } finally { - setLoading(false); + setIsFetching(false); } }; useEffect(() => { @@ -133,21 +132,15 @@ export function ManageFaq(props) { > UPDATE - {loading ? ( -
- -
- ) : ( - - )} + diff --git a/frontend/src/pages/Admin/Components/Faq/ManageFaq/manage-faq.module.scss b/frontend/src/pages/Admin/Components/Faq/ManageFaq/manage-faq.module.scss index 6ee1ebcf..644b7bca 100644 --- a/frontend/src/pages/Admin/Components/Faq/ManageFaq/manage-faq.module.scss +++ b/frontend/src/pages/Admin/Components/Faq/ManageFaq/manage-faq.module.scss @@ -48,6 +48,15 @@ background: linear-gradient(45deg, #4e4376 0%, #2b5876 90%); margin: 12px 0; border-radius: 10; + + &:hover { + background: linear-gradient( + 45deg, + rgba(255, 0, 90, 1) 0%, + rgba(10, 24, 61, 1) 90% + ); + transition: all 0.3s ease-in-out; + } } .btns-container { @@ -69,11 +78,3 @@ display: flex; flex-direction: column; } -.data-loader { - width: fit-content; - padding: 19px; - display: inline-flex; - height: 30px; - justify-content: center; - align-items: center; -}