From c9bbae35f91d223595dc30b33d191ac5d9524307 Mon Sep 17 00:00:00 2001 From: rockyeverlast Date: Mon, 7 Apr 2025 12:16:59 +0530 Subject: [PATCH] Bugs fixes for Manage CMS module --- dev-dist/sw.js | 2 +- src/Pages/Login.tsx | 21 ++--- src/Pages/ManageCMS/FAQ/EditDetails.tsx | 91 ++----------------- src/Pages/ManageCMS/FAQ/FAQ.tsx | 67 ++++++++------ .../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 4 +- .../PrivacyPolicy/PrivacyPolicyAddModel.tsx | 22 ++--- .../TermsAndConditions/TermsAndConditions.tsx | 74 ++++++++------- .../TermsAndConditionsAddModel.tsx | 49 +++++----- src/Redux/Service/faqs.service.ts | 15 ++- src/Redux/Service/manage.aboutus.service.ts | 2 +- src/components/NoData.tsx | 6 +- 11 files changed, 148 insertions(+), 205 deletions(-) diff --git a/dev-dist/sw.js b/dev-dist/sw.js index ec4592f..01e5a6f 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.cuug5u5p6eo" + "revision": "0.96d38pjn7gg" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/src/Pages/Login.tsx b/src/Pages/Login.tsx index 7463dc4..a023088 100644 --- a/src/Pages/Login.tsx +++ b/src/Pages/Login.tsx @@ -46,8 +46,7 @@ const Login = () => { // Encode Basic Auth Credentials const username = import.meta.env.VITE_USER_NAME || ""; // Replace with actual username const password = import.meta.env.VITE_PASSWORD || ""; // Replace with actual password - const credentials = `${username}:${password}`; // Encode to Base64 - const basicAuth = btoa(credentials); + const basicAuth = `${username}:${password}`; // Encode to Base64 try { const res = await axios.post( @@ -78,22 +77,18 @@ const Login = () => { console.log(res); console.log("===================================="); } - } catch (error: any) { - console.log('error', error?.response); + } catch (error) { + console.log('error', error); - if (axios.isAxiosError(error) && error.response) { - toaster.create({ - title: error.response.data?.message, - // title: "Something Went Wrong", - type: "info", - }); - } else { + if (error) { toaster.create({ + // title: error?.response?.data?.message, title: "Something Went Wrong", type: "info", - }); + }) + // console.log("Login failed", error?.response?.data?.message); + setIsLoading(false); } - setIsLoading(false); } }); diff --git a/src/Pages/ManageCMS/FAQ/EditDetails.tsx b/src/Pages/ManageCMS/FAQ/EditDetails.tsx index 18d0c08..2864c95 100644 --- a/src/Pages/ManageCMS/FAQ/EditDetails.tsx +++ b/src/Pages/ManageCMS/FAQ/EditDetails.tsx @@ -1,85 +1,3 @@ -// import { Button } from "../../../components/ui/button"; -// import { -// DialogBody, -// DialogCloseTrigger, -// DialogContent, -// DialogFooter, -// DialogHeader, -// DialogRoot, -// DialogTitle, -// DialogTrigger, -// } from "../../../components/ui/dialog"; -// import { Field, Input, Stack, Textarea } from "@chakra-ui/react"; -// import Edit from "../../../components/ActionIcons/Edit"; -// function EditDetails() { -// return ( -// -// -// {/* */} -// - -// - -// -// -// -// Edit Details -// -// - -// -// -// -// -// Questions -// -// - -// -// Answer -// -//