diff --git a/index.html b/index.html index 2628b5b..d41d835 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ const craftedMsg = "Crafted with ❤️ by WDI Team for a better web."; const craftedStyles = 'font-size: 16px; font-family: monospace; background: #000; color: #E5195E; padding: 12px 19px; border: 1.8px dashed; border-right: 0px #000 solid'; const websiteStyles = 'font-size: 16px; font-family: monospace; background: #E5195E; color: #000; padding: 12px 19px; border: 1.8px dashed #000; border-left: 0px #000 solid'; - console.log('%c' + craftedMsg + ' %c' + websiteMsg, craftedStyles, websiteStyles); + console.log('%c' + craftedMsg + ' %c' + websiteMsg, craftedStyles, websiteStyles); diff --git a/src/Components/Banner/AddBanner.jsx b/src/Components/Banner/AddBanner.jsx index e152450..68499cf 100644 --- a/src/Components/Banner/AddBanner.jsx +++ b/src/Components/Banner/AddBanner.jsx @@ -65,8 +65,8 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => { createApi(formData) .then((response) => { // Handle the response here - console.log("Mutation response:", response?.data?.statusCode); - console.log("Mutation response:", response?.data?.message); + // // console.log("Mutation response:", response?.data?.statusCode); + // // console.log("Mutation response:", response?.data?.message); if (response?.data?.statusCode === 200) { setIsLoading(false); @@ -94,13 +94,13 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => { }) .catch((error) => { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoading(false); // Handle error notification if needed }); } catch (error) { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoading(false); } }; diff --git a/src/Components/Banner/BannerEdit.jsx b/src/Components/Banner/BannerEdit.jsx index 2a03ea8..de9a1fd 100644 --- a/src/Components/Banner/BannerEdit.jsx +++ b/src/Components/Banner/BannerEdit.jsx @@ -110,13 +110,13 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} } // Log the FormData entries // for (const [key, value] of form.entries()) { - // console.log(`${key}: ${value}`); + // // console.log(`${key}: ${value}`); // } const mutationResult = await updateBanner({ id: id, data: form }) .then((response) => { // Handle the response here - console.log("Mutation response:", response?.data?.statusCode); - console.log("Mutation response:", response?.data?.message); + // // console.log("Mutation response:", response?.data?.statusCode); + // // console.log("Mutation response:", response?.data?.message); if (response?.data?.statusCode === 200) { setIsLoadingEdit(false); @@ -131,7 +131,7 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center} } }) .catch((error) => { - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoadingEdit(false); // setDeleteIsLoading(false); // setDeleteAlert(false); diff --git a/src/Components/Banner/BannerTable.jsx b/src/Components/Banner/BannerTable.jsx index dfaa308..dacbfcb 100644 --- a/src/Components/Banner/BannerTable.jsx +++ b/src/Components/Banner/BannerTable.jsx @@ -86,13 +86,13 @@ const BannerCommunity = ({ } }) .catch((error) => { - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setDeleteIsLoading(false); setDeleteAlert(false); }); } catch (error) { // Handle errors - console.error("Error deleting community:", error); + // // console.error("Error deleting community:", error); } }; @@ -115,11 +115,11 @@ const BannerCommunity = ({ } }) .catch((error) => { - console.log(error); + // // console.log(error); }); } catch (error) { // Handle errors - console.error("Error updating community status:", error); + // // console.error("Error updating community status:", error); } } }; diff --git a/src/Components/ChipSelector/ChipSelector.jsx b/src/Components/ChipSelector/ChipSelector.jsx index 8a1bc8f..d969d75 100644 --- a/src/Components/ChipSelector/ChipSelector.jsx +++ b/src/Components/ChipSelector/ChipSelector.jsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; -import { Box, Input, Tag, TagCloseButton, TagLabel } from "@chakra-ui/react"; +import { Box, FormHelperText, Input, Tag, TagCloseButton, TagLabel } from "@chakra-ui/react"; import { TiWarning } from "react-icons/ti"; -const ChipSelector = ({chips, setChips}) => { +const ChipSelector = ({chips, setChips, type}) => { const [text, setText] = useState(""); const [validationError, setValidationError] = useState(""); @@ -28,10 +28,11 @@ const ChipSelector = ({chips, setChips}) => { { onKeyDown={handlePressEnter} /> {validationError && {validationError}} + + + {type ? "Please select and press enter to add date." : "Please type and press enter to add tags."} + + { const { data, error, isLoading } = useGetNewsLetterEmailQuery(); - console.log(data); const handleDownload = () => { if (Array.isArray(data?.data?.rows)) { @@ -17,10 +16,10 @@ const Header = ({ link, btnTitle, title }) => { XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1"); XLSX.writeFile(workbook, "newsletter_emails.xlsx"); } else { - console.error( - "Expected data to be an array but received:", - data?.data?.rows - ); + // // console.error( + // "Expected data to be an array but received:", + // data?.data?.rows + // ); } }; return ( diff --git a/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx b/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx index 7ac0c00..4a6cdff 100644 --- a/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx +++ b/src/Pages/BlogsAndArticles/AddBlogsAndArticles.jsx @@ -96,8 +96,8 @@ const AddBlogsAndArticles = () => { createBlog(formData) .then((response) => { // Handle the response here - console.log("Mutation response:", response?.data?.statusCode); - console.log("Mutation response:", response?.data?.message); + // // console.log("Mutation response:", response?.data?.statusCode); + // // console.log("Mutation response:", response?.data?.message); if (response?.data?.statusCode === 201) { setIsLoading(false); @@ -123,13 +123,13 @@ const AddBlogsAndArticles = () => { }) .catch((error) => { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); setIsLoading(false); // Handle error notification if needed }); } catch (error) { // Handle errors - console.error("Error creating community:", error); + // // console.error("Error creating community:", error); } }; @@ -148,7 +148,6 @@ const AddBlogsAndArticles = () => { const handleImageChangeLarge = (e) => { const file = e.target.files[0]; setLargeImageData(file); - console.log(largeImageData); if (file) { const reader = new FileReader(); reader.onloadend = () => { @@ -360,7 +359,7 @@ const AddBlogsAndArticles = () => {