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 -// -//