diff --git a/Backend/package-lock.json b/Backend/package-lock.json
index 9c414da..8a84333 100644
--- a/Backend/package-lock.json
+++ b/Backend/package-lock.json
@@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
+ "axios": "^1.7.7",
"body-parser": "^1.20.3",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
@@ -33,6 +34,23 @@
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
},
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "license": "MIT"
+ },
+ "node_modules/axios": {
+ "version": "1.7.7",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
+ "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "follow-redirects": "^1.15.6",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
"node_modules/body-parser": {
"version": "1.20.3",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
@@ -83,6 +101,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -152,6 +182,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -285,6 +324,40 @@
"node": ">= 0.8"
}
},
+ "node_modules/follow-redirects": {
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
+ "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -553,6 +626,12 @@
"node": ">= 0.10"
}
},
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+ "license": "MIT"
+ },
"node_modules/qs": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
diff --git a/Backend/package.json b/Backend/package.json
index 520f305..9d9b172 100644
--- a/Backend/package.json
+++ b/Backend/package.json
@@ -10,6 +10,7 @@
"author": "Ujjwal Saini",
"license": "ISC",
"dependencies": {
+ "axios": "^1.7.7",
"body-parser": "^1.20.3",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
diff --git a/Backend/server.js b/Backend/server.js
index ba0aa53..71188ef 100644
--- a/Backend/server.js
+++ b/Backend/server.js
@@ -2,29 +2,30 @@ const express = require('express');
const nodemailer = require('nodemailer');
const cors = require('cors');
const bodyParser = require('body-parser');
-require("dotenv").config()
+const axios = require('axios'); // Import axios for external requests
+require("dotenv").config();
const app = express();
-const PORT = 5000; // You can change the port if needed
+const PORT = 5000;
app.use(cors());
app.use(bodyParser.json());
-// Set up Nodemailer transporter
+// Set up Nodemailer
const transporter = nodemailer.createTransport({
- service: 'gmail', // You can use another service like SendGrid or SMTP
+ service: 'gmail',
auth: {
- user: process.env.EMAIL_USER,
+ user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASS,
},
});
// GET route for /send-email to avoid "Cannot GET" error in the browser
app.get('/send-email', (req, res) => {
- res.send('Email API is running. Use POST /send-email to send an email.');
- });
-
-// Email sending endpoint
+ res.send('Email API is running. Use POST /send-email to send an email.');
+});
+
+// Email endpoint -1
app.post('/send-email', (req, res) => {
const { email } = req.body;
@@ -32,19 +33,19 @@ app.post('/send-email', (req, res) => {
return res.status(400).json({ success: false, message: 'Email is required' });
}
- const mailOptions = {
- from: 'saini.ujjwals007@gmail.com', // Your email
- to: email,
- subject: 'Congratulations! You’ve Successfully Subscribed to Daily Bhagavad Gita Shlokas!',
- text: `You have successfully subscribed to daily Bhagavad Gita Shlokas! Congratulations! 🎉
-
-Get ready to dive deep into the profound wisdom and teachings of the Bhagavad Gita. Each day, you will receive a meaningful Shloka delivered straight to your inbox. These sacred verses will guide you on a spiritual journey, offering insights into life, duty, and inner peace.
-
-Enjoy the daily dose of timeless philosophy and find inspiration from the divine teachings of Lord Krishna. 🌿
-
-We are excited to have you with us on this path of spiritual growth!`
+ const mailOptions = {
+ from: 'saini.ujjwals007@gmail.com',
+ to: email,
+ subject: 'Congratulations! You’ve Successfully Subscribed to Daily Bhagavad Gita Shlokas!',
+ text: `🎉 Hurray! You've officially subscribed to daily Bhagavad Gita Shlokas! 🌟✨
+
+ Get ready to dive deep into the profound wisdom and teachings of the Bhagavad Gita. Each day, you will receive a meaningful Shloka delivered straight to your inbox. These sacred verses will guide you on a spiritual journey, offering insights into life, duty, and inner peace.
+
+ Enjoy the daily dose of timeless philosophy and find inspiration from the divine teachings of Lord Krishna. 🌿
+
+ We are excited to have you with us on this path of spiritual growth!`,
};
-
+
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
console.error('Error sending email:', error);
@@ -55,19 +56,48 @@ We are excited to have you with us on this path of spiritual growth!`
});
});
+// New route to handle Google Apps Script API endpoint -2
+app.post('/submit-to-google', async (req, res) => {
+ const { email } = req.body;
+
+ if (!email) {
+ return res.status(400).json({ success: false, message: 'Email is required' });
+ }
+
+ try {
+ const googleFormData = new URLSearchParams();
+ googleFormData.append('email', email);
+
+ const googleApiResponse = await axios.post('https://script.google.com/macros/s/AKfycbxBtwPmMCVNgydtEF3GWwgKQUC0R3Fmzn9k5ecg5OC8Nj5IOll6OKvYACixwhDwVizN/exec', googleFormData, {
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ });
+
+ if (googleApiResponse.status !== 200) {
+ console.error("Google API Error: ", googleApiResponse.data);
+ return res.status(500).json({ success: false, message: 'Failed to submit to Google API' });
+ }
+
+ res.status(200).json({ success: true, message: googleApiResponse.data.message });
+ } catch (error) {
+ console.error("Error submitting to Google API:", error);
+ res.status(500).json({ success: false, message: 'Google API request failed' });
+ }
+});
+
// Start the server
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});
-export default app;
+module.exports = app;
-// TOdo: Basic Code with only post request not having Get Request
+// Todo: Code without Google API - Previous Vercel Prod
// const express = require('express');
// const nodemailer = require('nodemailer');
// const cors = require('cors');
// const bodyParser = require('body-parser');
+// require("dotenv").config()
// const app = express();
// const PORT = 5000; // You can change the port if needed
@@ -79,21 +109,23 @@ export default app;
// const transporter = nodemailer.createTransport({
// service: 'gmail', // You can use another service like SendGrid or SMTP
// auth: {
-// user: 'saini.ujjwals007@gmail.com',
-// pass: 'pnot bnpc cfwp wnyx',
+// user: process.env.EMAIL_USER,
+// pass: process.env.EMAIL_PASS,
// },
// });
+// // GET route for /send-email to avoid "Cannot GET" error in the browser
+// app.get('/send-email', (req, res) => {
+// res.send('Email API is running. Use POST /send-email to send an email.');
+// });
+
// // Email sending endpoint
// app.post('/send-email', (req, res) => {
// const { email } = req.body;
-// // const mailOptions = {
-// // from: 'saini.ujjwals007@gmail.com', // Your email
-// // to: email,
-// // // subject: 'Subscription Confirmation',
-// // text: '',
-// // };
+// if (!email) {
+// return res.status(400).json({ success: false, message: 'Email is required' });
+// }
// const mailOptions = {
// from: 'saini.ujjwals007@gmail.com', // Your email
@@ -113,6 +145,7 @@ export default app;
// console.error('Error sending email:', error);
// return res.status(500).json({ success: false, message: 'Failed to send email' });
// }
+// console.log('Email sent:', info.response);
// res.status(200).json({ success: true, message: 'Email sent successfully!' });
// });
// });
@@ -122,3 +155,5 @@ export default app;
// console.log(`Server is running on http://localhost:${PORT}`);
// });
+// export default app;
+
diff --git a/public/index.html b/public/index.html
index d3737cc..35ef1d1 100644
--- a/public/index.html
+++ b/public/index.html
@@ -10,21 +10,6 @@
content="Web site created using create-react-app"
/>
-
-
-
-
VedicVani
@@ -33,17 +18,7 @@
class="bg-gradient-to-t from-[#FF9900] to-[#FF6600] min-h-[100vh] text-gray-800 overflow-y-auto"
id="root"
>
-
+
diff --git a/public/manifest.json b/public/manifest.json
deleted file mode 100644
index 080d6c7..0000000
--- a/public/manifest.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "short_name": "React App",
- "name": "Create React App Sample",
- "icons": [
- {
- "src": "favicon.ico",
- "sizes": "64x64 32x32 24x24 16x16",
- "type": "image/x-icon"
- },
- {
- "src": "logo192.png",
- "type": "image/png",
- "sizes": "192x192"
- },
- {
- "src": "logo512.png",
- "type": "image/png",
- "sizes": "512x512"
- }
- ],
- "start_url": ".",
- "display": "standalone",
- "theme_color": "#000000",
- "background_color": "#ffffff"
-}
diff --git a/src/components/AboutUs.js b/src/components/AboutUs.js
index bf477cb..42b62eb 100644
--- a/src/components/AboutUs.js
+++ b/src/components/AboutUs.js
@@ -27,7 +27,6 @@ const textVariantdistort = (delay) => ({
},
});
-
function AboutUs() {
const [isHovered, setIsHovered] = useState(false);
const [isMobile, setIsMobile] = useState(false);
@@ -36,6 +35,8 @@ function AboutUs() {
const handleResize = () => {
setIsMobile(window.innerWidth <= 768);
};
+
+ window.scrollTo({ top: 0, behavior: 'smooth' });
handleResize();
window.addEventListener('resize', handleResize);
diff --git a/src/components/BhaktiGeet.js b/src/components/BhaktiGeet.js
index 54c4c7a..f2a2a39 100644
--- a/src/components/BhaktiGeet.js
+++ b/src/components/BhaktiGeet.js
@@ -512,6 +512,10 @@ const App = () => {
fontWeight: "450",
};
+ useEffect(() => {
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+ }, []);
+
return (
diff --git a/src/components/Chronicle.jsx b/src/components/Chronicle.jsx
index bd2696f..a1968b8 100644
--- a/src/components/Chronicle.jsx
+++ b/src/components/Chronicle.jsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useEffect } from 'react';
import { Link } from 'react-router-dom';
import ReactAudioPlayer from 'react-audio-player';
import Ramayana from "./Carousel_Images/CoverImages/Ramayana_Image.jpg";
@@ -63,6 +63,10 @@ const Chronicle = () => {
config: { tension: 150, friction: 6.8 },
});
+ useEffect(() => {
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+ }, []);
+
return (
{
}, [fetchVoices]);
useEffect(() => {
+
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+
const fetchData = async () => {
const urlParts = location.pathname.split("/");
const newChap = parseInt(urlParts[urlParts.indexOf("chapter") + 1]);
diff --git a/src/components/Resources.js b/src/components/Resources.js
index 98ee888..803759b 100644
--- a/src/components/Resources.js
+++ b/src/components/Resources.js
@@ -1,4 +1,4 @@
-import React from "react";
+import React, { useEffect } from "react";
import { Typewriter } from "react-simple-typewriter";
import { motion } from "framer-motion";
@@ -179,7 +179,9 @@ const headerStyle = {
};
const Resources = () => {
-
+ useEffect(() => {
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+ }, []);
return (
diff --git a/src/pages/Contact.js b/src/pages/Contact.js
index d03cf64..31c5fe0 100644
--- a/src/pages/Contact.js
+++ b/src/pages/Contact.js
@@ -16,6 +16,8 @@ const textVariant = (delay) => ({
const Contact = () => {
useEffect(() => {
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+
const script = document.createElement('script');
script.src = "https://static-bundles.visme.co/forms/vismeforms-embed.js";
script.async = true;
diff --git a/src/pages/EmailPusher.js b/src/pages/EmailPusher.js
deleted file mode 100644
index fb3e192..0000000
--- a/src/pages/EmailPusher.js
+++ /dev/null
@@ -1,127 +0,0 @@
-import React, { useState } from "react";
-
-const isMobile = window.innerWidth <= 768;
-const EmailPusher = () => {
-
- const [email, setEmail] = useState("");
-
- const handleSubmit = (e) => {
- e.preventDefault();
- console.log("Email Submitted:", email);
- };
-
- return (
-
-
- Want Daily Bhagvat Geeta Verse!
Enter your email below:
-
-
-
- );
-};
-
-const styles = {
- container: {
- display: "flex",
- flexDirection: "column",
- alignItems: "center",
- justifyContent: "center",
- height: "30vh", // Slightly larger height for more room
- padding: "20px",
- borderRadius: "15px",
- marginTop: isMobile ? "0" : "-3.5rem",
- marginLeft: isMobile ? "0" : "4rem",
- maxWidth: "600px", // Limit the width for large screens
- },
- description: {
- fontSize: "1.5rem",
- color: "#333",
- marginBottom: "20px",
- textAlign: "center",
- fontWeight: "bold",
- textShadow: "2px 2px 4px rgba(0, 0, 0, 0.3)",
- },
- form: {
- display: "flex",
- flexDirection: "column",
- alignItems: "center",
- width: "100%",
- },
- input: {
- padding: "10px",
- borderRadius: "10px",
- border: "none",
- width: "100%", // Full width on mobile
- maxWidth: "400px", // Limit input width on large screens
- marginBottom: "20px",
- fontSize: "1rem",
- backgroundColor: "#ffe5d5",
- boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
- transition: "box-shadow 0.3s ease",
- },
-
- // Media queries for responsiveness
- "@media (max-width: 768px)": {
- container: {
- padding: "10px", // Adjust padding for smaller screens
- height: "auto", // Allow flexible height for small screens
- },
- description: {
- fontSize: "1.25rem", // Smaller font size on mobile
- },
- input: {
- fontSize: "0.9rem", // Smaller input font for mobile
- },
- button: {
- fontSize: "1rem", // Adjust button font size on mobile
- padding: "8px 16px", // Slightly smaller button on mobile
- },
- },
- "@media (hover:hover)": {
- input: {
- "&:focus": {
- boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.3)",
- },
- },
- button: {
- "&:hover": {
- backgroundColor: "#004080",
- transform: "scale(1.05)",
- },
- },
- },
-};
-
-export default EmailPusher;
diff --git a/src/pages/Home.js b/src/pages/Home.js
index f741a2a..1755502 100644
--- a/src/pages/Home.js
+++ b/src/pages/Home.js
@@ -3,7 +3,6 @@ import { Link } from "react-router-dom";
import AOS from 'aos';
import './home.css';
-// import EmailPusher from './EmailPusher';
import { AudioPlayer } from 'react-audio-play';
import SweetEmailPusher from './SweetEmail';
import song from '../components/FluteTunes/krishnaflute.mp3';
@@ -16,6 +15,8 @@ function Home() {
const [verseOptions, setVerseOptions] = useState([]);
useEffect(() => {
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+
async function fetchData() {
try {
const req = await fetch(
@@ -116,12 +117,11 @@ function Home() {
-
+
-
diff --git a/src/pages/SweetEmail.js b/src/pages/SweetEmail.js
index 89ef9f1..0c1e7cc 100644
--- a/src/pages/SweetEmail.js
+++ b/src/pages/SweetEmail.js
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React from "react";
import Swal from "sweetalert2";
const isMobile = window.innerWidth <= 768;
@@ -14,10 +14,9 @@ const EmailPusher = () => {
});
if (email) {
- // Make POST request to send email
- // const response = await fetch('http://localhost:5000/send-email', {
+ // First API call: Sending email to the backend: endpoint: /send-email
const response = await fetch('https://vedic-vani-backend.vercel.app/send-email', {
- method: 'POST',
+ method: 'POST',
headers: {
'Content-Type': 'application/json',
},
@@ -27,7 +26,84 @@ const EmailPusher = () => {
const result = await response.json();
if (response.ok) {
- Swal.fire(`Entered Email: ${email}`, result.message, 'success');
+ // Confirmation of email
+ Swal.fire({
+ title: "Did you receive a confirmation email?",
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: "YES",
+ denyButtonText: "NO",
+ }).then(async (result) => {
+ if (result.isConfirmed) {
+ // Time Delay by 2 second for Backend Checking
+ let timerInterval;
+ Swal.fire({
+ title: "Verifying API Connectivity!",
+ html: "Checking complete in
milliseconds.",
+ timer: 2000,
+ timerProgressBar: true,
+ didOpen: () => {
+ Swal.showLoading();
+ const timer = Swal.getPopup().querySelector("b");
+ timerInterval = setInterval(() => {
+ timer.textContent = `${Swal.getTimerLeft()}`;
+ }, 100);
+ },
+ willClose: () => {
+ clearInterval(timerInterval);
+ }
+ }).then((result) => {
+ if (result.dismiss === Swal.DismissReason.timer) {
+ console.log("I was closed by the timer");
+ }
+ });
+ // Second API call to Google Apps Script endpoint: /submit-to-google
+ try {
+ const googleApiResponse = await fetch('https://vedic-vani-backend.vercel.app/submit-to-google', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json', // Ensure the correct Content-Type header
+ },
+ body: JSON.stringify({ email }), // Sending the email as JSON
+ });
+
+ if (!googleApiResponse.ok) {
+ const errorDetails = await googleApiResponse.text();
+ console.error("Google API Error Response: ", errorDetails);
+ Swal.fire("Failed to submit email to Google API: " + errorDetails);
+ }else {
+ const googleApiResult = await googleApiResponse.json();
+ await Swal.fire({
+ title: `Entered Email: ${email}`, text: googleApiResult.message, icon: 'success',
+ });
+
+ if (googleApiResult) {
+ const Toast = Swal.mixin({
+ toast: true,
+ position: "center",
+ showConfirmButton: false,
+ timer: 3600,
+ timerProgressBar: true,
+ didOpen: (toast) => {
+ toast.onmouseenter = Swal.stopTimer;
+ toast.onmouseleave = Swal.resumeTimer;
+ }
+ });
+ await Toast.fire({
+ icon: "success",
+ title: "You Successfully Subscribed - You'll Receive Sholak's Starting Tomorrow Morning",
+ });
+ }
+ }
+
+ } catch (googleApiError) {
+ console.error("Error submitting email to Google API:", googleApiError);
+ Swal.fire("An error occurred while submitting to Google API.");
+ }
+ } else if (result.isDenied) {
+ Swal.fire("Please subscribe again with a proper email ID", "", "info");
+ }
+ });
} else {
Swal.fire("Failed to send email: " + result.message);
}
@@ -104,3 +180,125 @@ const styles = {
};
export default EmailPusher;
+
+
+// Todo: Normal Without Post Request to API Server
+// import React, { useState } from "react";
+// import Swal from "sweetalert2";
+
+// const isMobile = window.innerWidth <= 768;
+
+// const EmailPusher = () => {
+// const promptForEmail = async () => {
+// try {
+// const { value: email } = await Swal.fire({
+// title: "Input Email Address",
+// input: "email",
+// inputLabel: "Your Email Address",
+// inputPlaceholder: "Enter your email address",
+// });
+
+// if (email) {
+// // Make POST request to send email
+// // const response = await fetch('http://localhost:5000/send-email', {
+// const response = await fetch('https://vedic-vani-backend.vercel.app/send-email', {
+// method: 'POST',
+// headers: {
+// 'Content-Type': 'application/json',
+// },
+// body: JSON.stringify({ email }),
+// });
+
+// const result = await response.json();
+
+// if (response.ok) {
+// Swal.fire({
+// title: "Did u Receive any Confirmation Email?",
+// showDenyButton: true,
+// showCancelButton: false,
+// confirmButtonText: "YES",
+// denyButtonText: `NO`
+// }).then((result) => {
+// if (result.isConfirmed) {
+// // Swal.fire("Oh Thats Great!", "", "success");
+// Swal.fire(`Entered Email: ${email}`, result.message, 'success');
+// } else if (result.isDenied) {
+// Swal.fire("Please Again Subscribe with Proper Email ID", "", "info");
+// }
+// });
+// } else {
+// Swal.fire("Failed to send email: " + result.message);
+// }
+// } else {
+// Swal.fire("No email entered.");
+// }
+// } catch (error) {
+// console.error("Error capturing email:", error);
+// Swal.fire("An error occurred while capturing your email.");
+// }
+// };
+
+// return (
+//
+//
+// Want Daily Bhagvat Geeta Shlok's?
Subscribe below Button:
+//
+//
+//
+// );
+// };
+
+// const styles = {
+// container: {
+// display: "flex",
+// flexDirection: "column",
+// alignItems: "center",
+// justifyContent: "center",
+// height: "30vh",
+// padding: "20px",
+// borderRadius: "15px",
+// marginTop: isMobile ? "0" : "-3.5rem",
+// marginLeft: isMobile ? "0" : "4rem",
+// maxWidth: "600px",
+// },
+// description: {
+// fontSize: "1.5rem",
+// color: "#333",
+// marginBottom: "20px",
+// textAlign: "center",
+// fontWeight: "bold",
+// textShadow: "2px 2px 4px rgba(0, 0, 0, 0.3)",
+// },
+// form: {
+// display: "flex",
+// flexDirection: "column",
+// alignItems: "center",
+// width: "100%",
+// },
+// };
+
+// export default EmailPusher;