Skip to content

Commit

Permalink
Merge branch 'HimanshuNarware:main' into new-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandu6702 authored Jun 8, 2024
2 parents 2159ee5 + fef5841 commit 6face97
Show file tree
Hide file tree
Showing 11 changed files with 202 additions and 230 deletions.
54 changes: 4 additions & 50 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,89 +1,43 @@
import React, { useState, useEffect } from "react";
import { Route, Routes } from "react-router-dom"; // Correct import
import "./App.css";

//components
import About from "./Component/About";
import Footer from "./Component/Footer";
import Rateus from "./Component/Rateus";
import Home from "./Component/Home";
import Navbar from "./Component/Navbar/Navbar";
import BookMark from "./Component/BookMark";
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 Review from "./Component/Review";

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

//cards

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 CodingPlatform from "./pages/CodingPlatform";
import CoursesPlatform from "./pages/CoursesPlatform";
import Faq from "./Component/Faq";

function App() {
const [searchQuery, setSearchQuery] = useState("");
AOS.init(); return (
<>
<ScrollToTop />
<Navbar setSearchQuery={setSearchQuery} />
<Routes>
<Route path='/' element={<Home searchQuery={searchQuery} />}></Route>
<Route path='/bookmark' element={<BookMark />}></Route>
<Route path='/about' element={<About />}></Route>
<Route path='/open-source' element={<OpenSource />}></Route>
<Route path='/review' element={<Review />} />
<Route path='*' element={<NotFound />} /> {/* 404 route */}
<Route path="/" element={<Home searchQuery={searchQuery} />}></Route>
<Route path="/bookmark" element={<BookMark />}></Route>
<Route path="/about" element={<About />}></Route>
<Route path="/open-source" element={<OpenSource />}></Route>
<Route path="/review" element={<Review />}></Route>
<Route path="/faq" element={<Faq />}></Route>

<Route path="/remote-jobs" element={<RemoteJobs />}></Route>
<Route path="/ai" element={<AI />}></Route>
<Route path="/movies-series" element={<Movie />}></Route>
<Route path="/extension" element={<Extension />}></Route>
<Route path="/ui-design" element={<UI />}></Route>
<Route path="/front-end-tools" element={<FrontendTools />}></Route>
<Route path="/ethical-hacking" element={<EthicalHacking />}></Route>
<Route path="/coding-platform" element={<CodingPlateform />}></Route>
<Route path="/cources-platform" element={<CourcesPlatform />}></Route>
<Route path="*" element={<NotFound />} /> {/* 404 route */}
</Routes>
<BackToTopButton />
<Toaster />
<ChatAssistant />
<Footer />
</>


useEffect(() => {
AOS.init();
}, []);

return (
<div>
<>
<ScrollToTop />
<Navbar setSearchQuery={setSearchQuery} />
<Routes>
Expand All @@ -93,6 +47,7 @@ function App() {
<Route path="/open-source" element={<OpenSource />} />
<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 @@ -108,8 +63,7 @@ function App() {
<Footer />
<ChatAssistant />
<Toaster />
</div>

</>
);
}

Expand Down
14 changes: 0 additions & 14 deletions frontend/src/ChatAssistant/ChatAssistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ 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'>
<button className="close-button" onClick={closeChatbot}>

{!isOpen && ( // Conditionally render the logo if the chatbot is closed
<img
className='Logo'
Expand All @@ -47,7 +34,6 @@ const ChatAssistant = () => {
{isOpen && (
<div className='chatbot-wrapper'>
<button className='close-button' onClick={closeChatbot}>

X
</button>
<div className='chatbot-animation'>
Expand Down
158 changes: 4 additions & 154 deletions frontend/src/Component/Footer.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
import React from "react";
import logo from "../image/logo.png";
import "../style/Footer.css";

import { FaGithubSquare } from "react-icons/fa";

import { FaGithubSquare, FaTwitter } from "react-icons/fa";

import { BsLinkedin } from "react-icons/bs";
import { SiGmail } from "react-icons/si";
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 @@ -33,8 +18,7 @@ function Footer() {
</a>
<h5>
Facing an issue or just <br />
enjoying the site?{" "}

enjoying the site?
</h5>
<button>
<Link to="/review">Tell us now</Link>
Expand All @@ -48,152 +32,18 @@ function Footer() {
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>
{/* Other list items */}
</ul>
</div>
<div className="col-md-6 col-lg-3 col-12 ft-2">
<h5>Quick Links</h5>
<ul>

<li className='nav-item'> <Link className='' to='/remote-jobs'>
Remote Jobs
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/ai'>
AI
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/movies-series'>
Movie/Series
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/extension'>
Extension
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/ui-design'>

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

UI Design
</Link>
</li>
</ul>
{/* Other content */}
</div>
<div className="col-md-6 col-lg-2 col-12 ft-4">
<h5>Explore</h5>
<ul>

<li className='nav-item'>
<Link className='' to='/front-end-tools'>
Frontend Tools
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/ethical-hacking'>
Ethical Hacking
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/coding-platform'>
Coding Platforms
</Link>
</li>
<li className='nav-item'>
<Link className='' to='/course-platform'>
=
<li className="nav-item">
<Link className="" to="/front-end-tools">
Frontend Tools
</Link>
</li>
<li className="nav-item">
<Link className="" to="/ethical-hacking">
Ethical Hacking
</Link>
</li>
<li className="nav-item">
<Link className="" to="/coding-platform">
Coding Platforms
</Link>
</li>
<li className="nav-item">
<Link className="" to="/courses-platform">
>>
Course Platforms
</Link>
</li>
</ul>
{/* Other content */}
</div>
</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='footer-icon mb-2'>
<a
href='https://www.linkedin.com/in/himanshunarware/'
rel='noreferrer'
target='_blank'
>
<BsLinkedin className='text-white mx-1 fs-4' />
</a>
<a
href='https://twitter.com/N_Himanshu_/'
rel='noreferrer'
target='_blank'
>
<i className='fa-brands fa-square-x-twitter text-white mx-1 fs-4'></i>

<div className="Last-footer">
<div className="container">
<div className="row justify-content-center">
Expand Down
22 changes: 22 additions & 0 deletions frontend/src/Component/Modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Modal.jsx
import React from 'react';
import "./../style/Modal.css";

function Modal({ isOpen, onClose, children }) {
if (!isOpen) {
return null;
}

return (
<div className="modal-overlay">
<div className="modal-content">
<button className="close-buttoned" onClick={onClose}>
&times;
</button>
{children}
</div>
</div>
);
}

export default Modal;
18 changes: 16 additions & 2 deletions frontend/src/Component/Navbar/NavbarCenter.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import React from "react";
// NavbarCenter.jsx
import React, { useState } from "react";
import { useSelector } from "react-redux";
import "../../style/Navbar.css";
import NavbarItem from "./NavbarItem";
import Modal from "../../Component/Modal";
import RateUsComponent from "../../Component/Rateus"; // Import the RateUsComponent

function NavbarCenter() {
const totalBookmarks = useSelector((state) => state.SourceReducer.totalBookmarks) || 0;
const [isModalOpen, setIsModalOpen] = useState(false);

const handleRateUsClick = () => {
setIsModalOpen(true);
};

return (
<nav className="navbar-center">
Expand All @@ -24,10 +32,16 @@ function NavbarCenter() {
<li className="nav-item">
<NavbarItem description="FAQ's" to="/faq" />
</li>
<li>
<li className="nav-item" onClick={handleRateUsClick}>
<NavbarItem description="Rate Us" to="#" />
</li>
<li className="nav-item">
<NavbarItem description="Contact" to="https://www.linkedin.com/in/himanshunarware/" />
</li>
</ul>
<Modal isOpen={isModalOpen} onClose={() => setIsModalOpen(false)}>
<RateUsComponent />
</Modal>
</nav>
);
}
Expand Down
Loading

0 comments on commit 6face97

Please sign in to comment.