Skip to content

Commit

Permalink
Update App.js
Browse files Browse the repository at this point in the history
Fixed minor formatting issues.
Added a 404 NotFound route for unmatched routes.
Improved the structure of the import statements by grouping related components.
  • Loading branch information
AKSHITHA-CHILUKA authored Jul 7, 2024
1 parent 3d1e6e7 commit a7c6628
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,52 @@
import React, { useState, useEffect } from "react";
import { Route, Routes } from "react-router-dom"; // Correct import
import { Route, Routes } from "react-router-dom";
import AOS from "aos";
import "aos/dist/aos.css";
import { Toaster } from "react-hot-toast";

import "./App.css";
import About from "./Component/About";

import Navbar from "./Component/Navbar/Navbar";
import Footer from "./Component/Footer";
import Rateus from "./Component/Rateus";
import ScrollToTop from "./Component/ScrollToTop";
import TrailingCursor from "./Component/TrailingCursor/TrailingCursor";
import BackToTopButton from "./Component/BackToTopButton";
import ChatAssistant from "./ChatAssistant/ChatAssistant";

import Home from "./Component/Home";
import Navbar from "./Component/Navbar/Navbar";
import NotFound from "./Component/NotFound";
import BackToTopButton from "./Component/BackToTopButton";
import About from "./Component/About";
import Rateus from "./Component/Rateus";
import Contact from "./Component/Contact";
import OpenSource from "./Component/OpenSource";
import Review from "./Component/Review";
import AOS from "aos";
import "aos/dist/aos.css";
import { Toaster } from "react-hot-toast";
import Faq from "./Component/Faq";
import BookMark from "./Component/BookMark";
import ScrollToTop from "./Component/ScrollToTop";
import Contact from "./Component/Contact";
//cards
import NotFound from "./Component/NotFound";

// Pages
import RemoteJobs from "./pages/RemoteJobs";
import AI from "./pages/AI";
import UI from "./pages/UI";
import Movie from "./pages/Movie";
import Extension from "./pages/Extension";
import EthicalHacking from "./pages/EthicalHacking";
import FrontendTools from "./pages/FrontendTools";
import Faq from "./Component/Faq";
import CodingPlatform from "./pages/CodingPlatform"; // Corrected import
import CodingPlatform from "./pages/CodingPlatform";
import CoursesPlatform from "./pages/CoursesPlatform";
import Collaboration from "./pages/Collaboration";
import TrailingCursor from "./Component/TrailingCursor/TrailingCursor";
import Productivity from "./pages/Productivity";

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

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

return (
<>
<ScrollToTop />
<TrailingCursor/>
<TrailingCursor />
<Navbar setSearchQuery={setSearchQuery} />
<Routes>
<Route path="/" element={<Home searchQuery={searchQuery} />} />
Expand All @@ -62,8 +68,7 @@ function App() {
<Route path="/courses-platform" element={<CoursesPlatform />} />
<Route path="/productivity-tools" element={<Productivity />} />
<Route path="/collaboration-tools" element={<Collaboration />} />
{/* Define other routes as needed */}
{/* <Route path="*" element={<NotFound />} /> 404 route */}
<Route path="*" element={<NotFound />} /> {/* 404 route */}
</Routes>
<BackToTopButton />
<Footer />
Expand Down

0 comments on commit a7c6628

Please sign in to comment.