Skip to content

Commit

Permalink
Merge pull request #638 from GnanariddhikaRavikumar/gnanariddhika
Browse files Browse the repository at this point in the history
Email Validation Done
  • Loading branch information
panwar8279 authored Jun 10, 2024
2 parents 89c97ec + 6900f27 commit 2d81f8b
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 23 deletions.
2 changes: 1 addition & 1 deletion backend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ app.use(bodyParser.urlencoded({ extended: true, limit: "50mb" }));

app.use(
cors({
origin: process.env.FRONTEND_URL.replace(/"/g, ""),
origin: 'http://localhost:3000',
credentials: true,
})
);
Expand Down
16 changes: 8 additions & 8 deletions frontend/package-lock.json

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

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/react-dom": "^18.3.0",
"antd": "^5.6.4",
"aos": "^2.3.4",
"axios": "^1.6.1",
"axios": "^1.7.2",
"bootstrap": "^5.3.2",
"cheerio": "^1.0.0-rc.12",
"darkmode-js": "^1.5.7",
Expand Down
30 changes: 30 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@

// App.js
import React, { useState } from "react";
import { Route, Routes } from "react-router-dom";
import React, { useState, useEffect } from "react";
import { Route, Routes, BrowserRouter } from "react-router-dom";

import "./App.css";
import About from "./Component/About";
import Footer from "./Component/Footer";
Expand All @@ -11,18 +16,39 @@ import ChatAssistant from "./ChatAssistant/ChatAssistant";
import NotFound from "./Component/NotFound";
import BackToTopButton from "./Component/BackToTopButton";
import OpenSource from "./Component/OpenSource";

import Review from "./Component/Review.js";
import AOS from "aos";
import "aos/dist/aos.css";

import { Toaster } from "react-hot-toast";


import Review from "./Component/Review";
import AOS from "aos";
import "aos/dist/aos.css";
import { Toaster } from "react-hot-toast";
import ScrollToTop from "./Component/ScrollToTop";

import RemoteJobs from "./pages/RemoteJobs";
import AI from "./pages/AI";
import Movie from "./pages/Movie";
import Extension from "./pages/Extension";
import UI from "./pages/UI";
import FrontendTools from "./pages/FrontendTools";
import EthicalHacking from "./pages/EthicalHacking";

import CodingPlateform from "./pages/CodingPlateform";
import CourcesPlatform from "./pages/CourcesPlatform";

import ScrollToTop from "./Component/ScrollToTop";
import Faq from "./Component/Faq";

function App() {
const [searchQuery, setSearchQuery] = useState("");
AOS.init();

return (
import CodingPlateform from "./pages/CodingPlatform.jsx";
import CourcesPlatform from "./pages/CoursesPlatform";
import Faq from "./Component/Faq";
Expand All @@ -45,6 +71,7 @@ function App() {
<Route path="/review" element={<Review />} />
<Route path="/faq" element={<Faq />} />
<Route path="/rateus" element={<Rateus />} />

<Route path="/remote-jobs" element={<RemoteJobs />} />
<Route path="/ai" element={<AI />} />
<Route path="/movies-series" element={<Movie />} />
Expand All @@ -64,6 +91,9 @@ function App() {
<Toaster />
<Footer />
<ChatAssistant />

<Toaster />

</>
);
}
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/ChatAssistant/ChatAssistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ const ChatAssistant = () => {
};

return (

<div className="chatbot">
<img
className="Logo"
src={chatbotLogo}
alt="Logo"
onClick={toggleChatbot}
onMouseEnter={() => (document.querySelector(".Logo").src = chatbotLogo1)}
onMouseLeave={() => (document.querySelector(".Logo").src = chatbotLogo)}
/>
{isOpen && (
<div className={`chatbot-wrapper ${isOpen ? "chatbot-animation" : "chatbot-close-animation"}`}>
<button className="close-button" onClick={closeChatbot}>
X
</button>
<Chatbot
config={config}
messageParser={MessageParser}
actionProvider={ActionProvider}
/>
<div className='chatbot'>
{!isOpen && ( // Conditionally render the logo if the chatbot is closed
<img
Expand All @@ -43,6 +63,7 @@ const ChatAssistant = () => {
actionProvider={ActionProvider}
/>
</div>

</div>
)}
</div>
Expand Down
120 changes: 108 additions & 12 deletions frontend/src/Component/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import { Link } from "react-router-dom";
function Footer() {
return (
<footer>
<div className="Footer">
<div className="container">
<div className="row">
<div className="col-md-6 col-lg-4 col-12 ft-1">
<a href="https://www.devlabsstore.tech/">
<img width={209} src={logo} alt="devlaps" />
</a>
<h5>
Facing an issue or just <br />
enjoying the site?

<div className='Footer'>
<div className='container'>
<div className='row'>
Expand All @@ -19,14 +30,41 @@ function Footer() {
<h5>
Facing an issue or just <br />
enjoying the site?{" "}

</h5>
<button>
<Link to='/review'>Tell us now</Link>
<Link to="/review">Tell us now</Link>
</button>
</div>
<div className='col-md-6 col-lg-3 col-12 ft-2'>
<div className="col-md-6 col-lg-3 col-12 ft-2">
<h5>Company</h5>
<ul>

<li className="nav-item">
<a className="" href="https://www.devlabsstore.tech/">
Home
</a>
</li>
<li className="nav-item">
<a className="" href="https://www.devlabsstore.tech/about">
About Us
</a>
</li>
<li className="nav-item">
<a className="" href="https://www.devlabsstore.tech/bookmark">
Bookmark
</a>
</li>
<li className="nav-item">
<a className="" href="https://www.linkedin.com/in/himanshunarware/">
Contact
</a>
</li>
<li className="nav-item">
<a className="" href="https://www.devlabsstore.tech/open-source">
Open Source
</a>

<li className='nav-item'>
<a href='https://www.devlabsstore.tech/'>Home</a>
</li>
Expand All @@ -44,9 +82,35 @@ function Footer() {
</li>
</ul>
</div>
<div className='col-md-6 col-lg-3 col-12 ft-2'>
<div className="col-md-6 col-lg-3 col-12 ft-2">
<h5>Quick Links</h5>
<ul>

<li className="nav-item">
<a className="" href="/remote-jobs">
Remote Jobs
</a>
</li>
<li className="nav-item">
<a className="" href="/ai">
AI
</a>
</li>
<li className="nav-item">
<a className="" href="/movies-series">
Movie/Series
</a>
</li>
<li className="nav-item">
<a className="" href="/extension">
Extension
</a>
</li>
<li className="nav-item">
<a className="" href="/ui-design">
UI Design
</a>

<li className='nav-item'>
<a href='/remote-jobs'>Remote Jobs</a>
</li>
Expand All @@ -61,12 +125,34 @@ function Footer() {
</li>
<li className='nav-item'>
<a href='/ui-design'>UI Design</a>

</li>
</ul>
</div>
<div className='col-md-6 col-lg-2 col-12 ft-4'>
<div className="col-md-6 col-lg-2 col-12 ft-4">
<h5>Explore</h5>
<ul>

<li className="nav-item">
<a className="" href="/front-end-tools">
Frontend Tools
</a>
</li>
<li className="nav-item">
<a className="" href="/ethical-hacking">
Ethical Hacking
</a>
</li>
<li className="nav-item">
<a className="" href="/coding-platform">
Coding Platforms
</a>
</li>
<li className="nav-item">
<a className="" href="/course-platform">
Course Platforms
</a>

<li className='nav-item'>
<a href='/front-end-tools'>Frontend Tools</a>
</li>
Expand All @@ -86,6 +172,14 @@ function Footer() {
</div>
</div>
</div>
<div className="Last-footer">
<div className="container">
<div className="row justify-content-center">
<div className="col-md-6 col-12 ft-1">
<p className="text-center fs-6">
COPYRIGHT © Devlaps 2024 | <br /> MAINTAINED BY HIMANSHU NARWARE
</p>


<div className="Last-footer">
<div className="container">
Expand All @@ -103,21 +197,23 @@ function Footer() {
<BsLinkedin className="text-white mx-1 fs-4" />
</a>
<a
href='https://twitter.com/N_Himanshu_/'
rel='noreferrer'
target='_blank'
href="https://twitter.com/N_Himanshu_/"
rel="noreferrer"
target="_blank"
>
<FaTwitter className="text-white mx-1 fs-4" />
<FaTwitter className='text-white mx-1 fs-4' />

</a>
<a href='mailto:himanshunarware77@gmail.com' rel='noreferrer'>
<SiGmail className='text-white mx-1 fs-4' />
<a href="mailto:himanshunarware77@gmail.com" rel="noreferrer">
<SiGmail className="text-white mx-1 fs-4" />
</a>
<a
href='https://github.com/HimanshuNarware/Devlabs'
rel='noreferrer'
target='_blank'
href="https://github.com/HimanshuNarware/Devlabs"
rel="noreferrer"
target="_blank"
>
<FaGithubSquare className="text-white mx-1 fs-4" />
<FaGithubSquare className='text-white mx-1 fs-4' />

</a>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/Component/Review.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ function Review() {
const onSubmitHandler = async (event) => {
event.preventDefault();

const emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
const emailPattern = /^[a-zA-Z0-9._-]+@gmail.com$/;
const email = document.getElementById("email").value;
if (!emailPattern.test(email)) {
toast.error("Please enter a valid email address.");
return;
}
else{
toast.success("Review Submitted");
}

setProcessingMail(true);
const response = await axios
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// index.js
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
Expand All @@ -8,6 +9,7 @@ import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import App from "./App";
import { BrowserRouter } from "react-router-dom";
import App from './App'; // Import the App component

const root = ReactDOM.createRoot(document.getElementById("root"));

Expand All @@ -31,6 +33,10 @@ root.render(
<Provider store={store}>

<BrowserRouter>

<Preloader />
{/* <App /> Render the App component */}

<App />
{/* <Preloader /> */}
<ToastContainer />
Expand Down

0 comments on commit 2d81f8b

Please sign in to comment.