Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feat/ContactUs-form branch #381

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/config/oauth.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const GoogleStrategy = require("passport-google-oauth20").Strategy;
const passport = require("passport");
const Customer = require("../models/customer.model"); // Adjust the path as needed
const config = require("./secret"); // Import your secrets (client ID, client secret)
console.log("config", config);
// console.log("config", config);
passport.use(
new GoogleStrategy(
{
Expand Down
73 changes: 73 additions & 0 deletions backend/controller/contact.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const { z } = require("zod");
const nodemailer = require("nodemailer");
require("dotenv").config();

// data require form .env file : EMAIL_USER, EMAIL_PASS

// Define the Zod schema for contact form validation
const contactSchema = z.object({
mail: z.string().email(),
subject: z.string().min(5, "Subject must be at least 5 characters long."),
message: z.string().min(5, "Message must be at least 5 characters long."),
});

const info = { messageId: "23DCS141" };

const createContactUs = async (req, res) => {
const validation = contactSchema.safeParse(req.body);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Environment variables EMAIL_USER and EMAIL_PASS are not set.

Please set EMAIL_USER and EMAIL_PASS in your deployment environment to prevent authentication issues.

🔗 Analysis chain

Ensure environment variables are loaded correctly.

While you have require("dotenv").config(); at the top, it's important to ensure that the environment variables EMAIL_USER and EMAIL_PASS are properly loaded and handled in case they're missing.

Run the following script to check if the environment variables are set:

Ensure that these variables are set in your deployment environment to prevent authentication errors.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that EMAIL_USER and EMAIL_PASS are defined in the environment.

# Check for EMAIL_USER
if [ -z "$EMAIL_USER" ]; then
  echo "Environment variable EMAIL_USER is not set."
else
  echo "Environment variable EMAIL_USER is set."
fi

# Check for EMAIL_PASS
if [ -z "$EMAIL_PASS" ]; then
  echo "Environment variable EMAIL_PASS is not set."
else
  echo "Environment variable EMAIL_PASS is set."
fi

Length of output: 225


if (!validation.success) {
console.log("Error at validation");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use console.error for logging errors.

Using console.error instead of console.log for logging errors provides better semantic meaning and can help in error monitoring.

Apply this diff to update the logging statements:

 // In validation failure
-    console.log("Error at validation");
+    console.error("Error at validation");

 // In sendMail error handling
-      return console.log("Error occurred: " + error.message);
+      console.error("Error occurred: " + error.message);

 // In catch block
-    console.log(`Error at transport: ${err}`);
+    console.error(`Error at transport: ${err}`);

Also applies to: 54-54, 64-64

return res.status(400).json({
status: "error",
errors: "contactSchema is not validate",
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Improve error handling and messages on validation failure.

The error message "contactSchema is not validate" is grammatically incorrect. Additionally, consider providing detailed validation errors to the client for better clarity.

Apply this diff to fix the error message and include validation details:

     console.log("Error at validation");
     return res.status(400).json({
       status: "error",
-      errors: "contactSchema is not validate",
+      errors: validation.error.errors,
     });

This change returns the specific validation errors provided by Zod, helping the client understand what went wrong.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log("Error at validation");
return res.status(400).json({
status: "error",
errors: "contactSchema is not validate",
});
console.log("Error at validation");
return res.status(400).json({
status: "error",
errors: validation.error.errors,
});

}

const { mail, subject, message } = req.body;

try {
const transporter = nodemailer.createTransport({
service: "gmail",
host: "smtp.gmail.com",
port: 587,
secure: false,
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASS,
},
tls: {
rejectUnauthorized: false, // Disable strict SSL verification
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enable SSL verification in transporter configuration.

Disabling SSL verification by setting rejectUnauthorized: false can expose the application to security risks like man-in-the-middle attacks. It's best to enable SSL verification unless there's a specific reason not to.

Apply this diff to enable SSL verification:

     tls: {
-      rejectUnauthorized: false, // Disable strict SSL verification
+      // Removed to enable strict SSL verification
     },

If the tls configuration is not required, you can remove it entirely.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
tls: {
rejectUnauthorized: false, // Disable strict SSL verification
},
tls: {
// Removed to enable strict SSL verification
},

});

const mailOptions = {
from: mail,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Avoid setting 'from' to a user-provided email to prevent spoofing.

Setting the from field to a user-provided email address (mail) can lead to email spoofing and may cause the email to be rejected or marked as spam. Use a verified email address for the from field and set replyTo to the user's email address.

Apply this diff to fix the issue:

 const mailOptions = {
-  from: mail,
+  from: process.env.EMAIL_USER,
+  replyTo: mail,
   to: process.env.EMAIL_USER,
   subject: subject,
   text: message,
 };

This ensures that the email is sent from a trusted address while allowing you to reply to the user's email.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
from: mail,
from: process.env.EMAIL_USER,
replyTo: mail,
to: process.env.EMAIL_USER,

to: process.env.EMAIL_USER,
subject: subject,
text: message,
};

// Send mail with defined transport object
transporter.sendMail(mailOptions, (error, mailOptions) => {
if (error) {
return console.log("Error occurred: " + error.message);
}

});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Handle errors in transporter.sendMail and send appropriate responses.

Currently, if sendMail fails, the error is only logged, and the client still receives a 200 OK response. To properly inform the client of the failure, send an error response when sending the email fails.

Apply this diff to handle errors and send appropriate responses:

 // Send mail with defined transport object
 transporter.sendMail(mailOptions, (error, info) => {
   if (error) {
-    return console.log("Error occurred: " + error.message);
+    console.error("Error occurred: " + error.message);
+    return res.status(500).json({
+      status: "error",
+      message: "There was an error sending your message. Please try again later.",
+    });
   }
-
+  res.status(200).json({
+    status: "success",
+    message: "Your contact request has been successfully received.",
+  });
 });
-
-res.status(200).json({
-  status: "success",
-  message: "Your contact request has been successfully received.",
-});

This change moves the success response inside the callback after the email is sent successfully and sends an error response if there's a failure.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
transporter.sendMail(mailOptions, (error, mailOptions) => {
if (error) {
return console.log("Error occurred: " + error.message);
}
});
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
console.error("Error occurred: " + error.message);
return res.status(500).json({
status: "error",
message: "There was an error sending your message. Please try again later.",
});
}
res.status(200).json({
status: "success",
message: "Your contact request has been successfully received.",
});
});


res.status(200).json({
status: "success",
message: "Your contact request has been successfully received.",
});
} catch (err) {
console.log(`Error at transport: ${err}`);
res.status(500).json({
status: "error",
message:
"There was an error sending your message. Please try again later.",
});
}
};

module.exports = { createContactUs };
2 changes: 1 addition & 1 deletion backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require("dotenv").config();
const cors = require("cors");
const mongoose = require("mongoose");
const logger = require("./config/logger");
const errorMiddleware = require("./middlewares/errorMiddleware"); // Corrected typo
const errorMiddleware = require("../backend/middlewares/errrorMiddleware"); // Corrected typo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Fix typo in error middleware filename and import path

The error middleware file is incorrectly named with an extra 'r', which can lead to confusion and potential issues.

  • Rename backend/middlewares/errrorMiddleware.js to backend/middlewares/errorMiddleware.js.

  • Update the import statement in backend/index.js accordingly:

    - const errorMiddleware = require("../backend/middlewares/errrorMiddleware"); // Corrected typo
    + const errorMiddleware = require("../backend/middlewares/errorMiddleware"); // Corrected typo
🔗 Analysis chain

Fix typo in error middleware import path

The import statement for the error middleware contains a typo in the file name. While attempting to correct a previous issue, a new typo has been introduced.

Please apply the following change:

- const errorMiddleware = require("../backend/middlewares/errrorMiddleware"); // Corrected typo
+ const errorMiddleware = require("../backend/middlewares/errorMiddleware"); // Corrected typo

Also, please verify that this is indeed the correct path to the error middleware file. The change from ./ to ../backend/ suggests a significant change in the project structure. Ensure that this path is correct relative to the location of index.js.

To verify the correct path of the error middleware file, run the following command:

This will help confirm the correct location of the file and ensure that the import statement is accurate.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Locate the error middleware file and verify its path

# Test: Search for the error middleware file
fd errorMiddleware.js

Length of output: 23


Script:

#!/bin/bash
# Description: Locate the incorrectly named error middleware file to verify the typo

# Test: Search for the incorrectly spelled error middleware file
fd errrorMiddleware.js

Length of output: 64

const passport = require("passport");
const { handleGoogleOAuth } = require("./controller/googleOAuth.controller");
const app = express();
Expand Down
7 changes: 7 additions & 0 deletions backend/routes/contactUsRouter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const express = require("express");
const router = express.Router();
const { createContactUs } = require("../controller/contact.controller"); // Correct controller path

router.post("/contactus", createContactUs);

module.exports = router;
60 changes: 24 additions & 36 deletions backend/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,45 @@
const express = require("express");
const logger = require("../config/logger"); // Import your Winston logger
const logger = require("../config/logger"); // Import Winston logger
require("dotenv").config();

const config = {
JWT_SECRET: process.env.JWT_SECRET,
GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,
};

const router = express.Router();

let feedbackRouter;

try {
feedbackRouter = require("./feedbackRouter");
} catch (error) {
logger.error("Error loading feedbackRouter:", error); // Log the error with Winston
feedbackRouter = (req, res) => {
res
.status(500)
.json({ error: "Feedback functionality is currently unavailable" });
};
}
// Utility function to safely load modules and handle errors
const safeRequire = (modulePath, fallbackMessage) => {
try {
return require(modulePath);
} catch (error) {
logger.error(`Error loading ${modulePath}:`, error);
return (req, res) => {
res.status(500).json({ error: fallbackMessage });
};
}
};

let eventRouter;
try {
eventRouter = require("./eventRouter");
} catch (error) {
logger.error("Error loading eventRouter:", error); // Log the error with Winston
eventRouter = (req, res) => {
res
.status(500)
.json({ error: "Event functionality is currently unavailable" });
};
}
// Safely load routers with error handling
const feedbackRouter = safeRequire("./feedbackRouter", "Feedback functionality is currently unavailable");
const contactUsRouter = safeRequire("./contactUsRouter", "Contact Us functionality is currently unavailable");
const eventRouter = safeRequire("./eventRouter", "Event functionality is currently unavailable");

router.get("/", (req, res) => {
return res.json({
message: "Welcome to the restaurant API!",
version: "1.0.0",
endpoints: {
Reservation: "/reservation",
Feedback: "/feedback", // Added feedback endpoint documentation
Feedback: "/feedback",
},
documentation: "https://api-docs-url.com",
});
});

router.use("/event", eventRouter);
router.use("/admin", require("./adminRouter"));
router.use("/admin", safeRequire("./adminRouter", "Admin functionality is currently unavailable"));
router.use("/feedback", feedbackRouter);
router.use("/user", require("./customerRouter"));
router.use("/reservation", require("./reservationRouter"));
router.use("/newsletter", require("./newsletterRoute"));
router.use("/forgot", require("./forgotRouter"));
router.use("/user", safeRequire("./customerRouter", "User functionality is currently unavailable"));
router.use("/reservation", safeRequire("./reservationRouter", "Reservation functionality is currently unavailable"));
router.use("/newsletter", safeRequire("./newsletterRoute", "Newsletter functionality is currently unavailable"));
router.use("/forgot", safeRequire("./forgotRouter", "Forgot password functionality is currently unavailable"));
router.use("/contact", contactUsRouter);

module.exports = router;
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"framer-motion": "^11.5.6",
"gsap": "^3.12.5",
"js-cookie": "^3.0.5",
"lucide-react": "^0.453.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
Expand Down
165 changes: 165 additions & 0 deletions frontend/src/components/Pages/ContactUs.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/* eslint-disable prettier/prettier */
/* eslint-disable no-unused-vars */
import { useState } from 'react';
import { motion } from 'framer-motion';
import { useInView } from 'react-intersection-observer';
import chess from '../../assets/img/chess.gif';
import { FaStar } from 'react-icons/fa6';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove unused import FaStar.

The FaStar component from react-icons is imported but never used in the code.

-import { FaStar } from 'react-icons/fa6';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { FaStar } from 'react-icons/fa6';


const ContactUs = () => {
const { ref, inView } = useInView({
threshold: 0.2,
triggerOnce: true,
});

const animationVariants = {
hidden: { opacity: 0, y: 50 },
visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
};

// Use an environment variable for backend URL
const API_URL = import.meta.env.VITE_BACKEND_URL || 'http://localhost:3000';
const [mail, setMail] = useState('');
const [subject, setSubject] = useState('');
const [message, setMessage] = useState('');
const [submitted, setSubmitted] = useState(false);
const [hover, setHover] = useState(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove unused state variable hover.

The hover state and its setter are declared but never used in the component.

-const [hover, setHover] = useState(null);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const [hover, setHover] = useState(null);

const [error, setError] = useState(null);
const [isLoading, setIsLoading] = useState(false);

const handleSubmit = async (e) => {
e.preventDefault();

// Basic client-side validation for security
if (!mail || !subject || !message) {
setError('All fields are required, including the rating.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update error message to reflect actual fields.

The error message mentions "including the rating," but there is no rating field in the form. Please update the message to accurately reflect the required fields.

Apply this diff to correct the error message:

-         setError('All fields are required, including the rating.');
+         setError('All fields are required.');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
setError('All fields are required, including the rating.');
setError('All fields are required.');

return;
}

// Clear any previous errors
setError(null);

setIsLoading(true);
try {
const response = await fetch(`${API_URL}/api/contact/contactus`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ mail, subject, message }),
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add response status check after the fetch request.

Currently, the code assumes that the fetch request is always successful. It's good practice to check the response status and handle errors accordingly.

Apply this diff to check the response status:

           const response = await fetch(`${API_URL}/api/contact/contactus`, {
             method: 'POST',
             headers: {
               'Content-Type': 'application/json',
             },
             body: JSON.stringify({ mail, subject, message }),
           });
+          if (!response.ok) {
+            throw new Error('Network response was not ok');
+          }
           setSubmitted(true);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const response = await fetch(`${API_URL}/api/contact/contactus`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ mail, subject, message }),
});
const response = await fetch(`${API_URL}/api/contact/contactus`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ mail, subject, message }),
});
if (!response.ok) {
throw new Error('Network response was not ok');
}


setSubmitted(true);
setTimeout(() => {
setMail('');
setSubject('');
setMessage('');
setSubmitted(false);
}, 3000);
} catch (error) {
setError('An error occurred while sending Mail...');
console.error('Mail sending failed : ', error);
} finally {
setIsLoading(false);
}
};

return (
<div className="bg-amber-100 h-full py-24 px-4 sm:px-6 lg:px-8">
<div className="max-w-7xl mx-auto">
<motion.div
ref={ref}
initial="hidden"
animate={inView ? 'visible' : 'hidden'}
variants={animationVariants}
className="lg:grid lg:grid-cols-2 lg:gap-8 lg:items-center"
>
<div className="mt-8 mb-8 lg:mb-0 relative">
<h2 className="text-5xl font-black text-[#004D43]">
Feel Free To Mail Us..
</h2>
<p className="mt-5 text-lg text-gray-700 pb-3">
Have questions or need assistance ? Reach out to us, and we'll be
happy to help !!
</p>
<div className="flex md:h-[40vh] md:w-[60vh] ml-20 mt-20 items-center justify-center mt-12">
<img
src={chess}
alt="Chess"
loading="lazy"
className="md:p-10 p-5 object-contain bg-[#004D43] rounded-full shadow-2xl"
/>
</div>
</div>

<div className="bg-[#004D43] rounded-xl p-3 pt-4 mt-40 h-fit">
<form onSubmit={handleSubmit} className="space-y-4">
<div>
<input
type="mail"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct the input type for the email field.

The type attribute for the email input should be "email" instead of "mail" to enable proper email validation.

Apply this diff to fix the input type:

-           type="mail"
+           type="email"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type="mail"
type="email"

id="mail"
value={mail}
placeholder="Email ID"
onChange={(e) => setMail(e.target.value)}
required
className="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-[#004D43] focus:border-[#004D43]"
/>
</div>
<div>
<input
type="text"
id="text"
placeholder="Subject"
value={subject}
onChange={(e) => setSubject(e.target.value)}
required
className="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-[#004D43] focus:border-[#004D43]"
/>
</div>
<div>
<textarea
id="message"
placeholder="Write your message..."
rows="6"
value={message}
onChange={(e) => setMessage(e.target.value)}
required
className="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-[#004D43] focus:border-[#004D43] resize-none"
></textarea>
</div>
<div>
<button
type="submit"
className="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-[#09342e] hover:bg-[#072d28] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#004D43]"
disabled={isLoading}
>
{isLoading ? 'Sending...' : 'Send Mail'}
</button>
</div>
</form>
{submitted && (
<motion.div
initial={{ opacity: 0, y: -10, display: 'none', height: 0 }}
animate={{ opacity: 1, y: 0, display: 'block', height: 'auto' }}
className="mt-4 p-4 bg-green-100 border border-green-400 text-green-700 rounded"
>
Thank you, We will reply you soon...
</motion.div>
)}
{error && (
<motion.div
initial={{ opacity: 0, y: -10 }}
animate={{ opacity: 1, y: 0 }}
className="mt-4 p-4 bg-red-100 border border-red-400 text-red-700 rounded"
>
{error}
</motion.div>
)}
</div>
</motion.div>
</div>
</div>
);
};

export default ContactUs;
1 change: 1 addition & 0 deletions frontend/src/components/Shared/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Navbar = () => {
{ name: 'RESERVATION', path: '/reservation' },
{ name: 'BOARDGAMES', path: '/boardgame' },
{ name: 'MEMBERSHIP', path: '/membership' }, // Add Membership here
{ name: 'CONTACTUS', path: '/contactus'}
];

useEffect(() => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/router/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import Admin from '../components/Pages/Admin';
import VerifyOtp from '../components/Pages/VerifyOtp';
import EmailVerify from '../components/Pages/EmailVerify';
import Membership from '../components/Membership';
import ContactUs from '../components/Pages/ContactUs';
const router = createBrowserRouter(
createRoutesFromElements(
<Route path="/" element={<App />}>
Expand All @@ -39,7 +40,7 @@ const router = createBrowserRouter(
<Route path="/verifyotp/:id" element={<VerifyOtp />} />
<Route path="/email-verify" element={<EmailVerify />} />
<Route path="/membership" element={<Membership />} />

<Route path="/contactus" element={<ContactUs />} />
</Route>
)
);
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.