Skip to content

Commit

Permalink
Fixed Books Routing
Browse files Browse the repository at this point in the history
  • Loading branch information
narayanvyas committed Jun 3, 2024
1 parent ec7f61f commit 01e95c9
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 465 deletions.
69 changes: 7 additions & 62 deletions src/app/App.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
// src/App.js

import React, { useState, useEffect } from "react";
import { Route, Routes, useLocation } from 'react-router-dom';
import WOW from 'wowjs';


//Custom Components

// Custom Components
import Home from '../pages/home';
import HomeTwo from '../pages/home-2';
import HomeThree from '../pages/home-3';
import HomeFour from '../pages/home-4';
import HomeFive from '../pages/home-5';
import About from '../pages/about';
import AboutMe from '../pages/about/about-me';
import Services from '../pages/service';
import ServiceTwo from '../pages/service/service-2';
import ServiceThree from '../pages/service/service-3';
import ServiceDetails from '../pages/service/service-details';
import MobileAppDevelopmentDetails from '../pages/service/mobile-app-development-details';
import IoTSolutionsDetails from '../pages/service/iot-solutions-details';
Expand All @@ -29,50 +22,28 @@ import TermsOfService from '../pages/misc/terms-of-service';
import PrivacyPolicy from '../pages/misc/privacy-policy';
import Disclaimer from '../pages/misc/disclaimer';
import Projects from '../pages/projects';
import ProjectOne from '../pages/projects/project-1';
import ProjectTwo from '../pages/projects/project-2';
import ProjectMasonary from '../pages/projects/project-masonary';
import ProjectDetails from '../pages/projects/project-details';
import Cart from '../pages/cart';
import Checkout from '../pages/checkout';
import Faq from '../pages/faq';
import Price from '../pages/price';
import Testimonial from '../pages/testimonial';
import Login from '../pages/login';
import Register from '../pages/register';
import Error from '../pages/error';
import Job from '../pages/job';
import JobDetails from '../pages/job/job-details';
import Product from '../pages/product';
import ProductDetails from '../pages/product/product-details';
import Certificates from '../pages/certificates/certificates-masonary';
import Books from '../pages/books';
import BooksDetails from '../pages/books/BookDetails'; // Import the correct BooksDetailsPage component
import Appointments from '../pages/appointments';
import ApplyingMLInBioinformaticsIGIDetails from '../pages/books/applying-ml-in-bioinformatics-igi-details';
import InnovationsInMLIoTWaterManagementIGIDetails from '../pages/books/innovations-in-ml-iot-water-management-igi-details';
import QuantumInBiomedicalIGIDetails from '../pages/books/quantum-in-biomedical-igi-details';
import AIDrivenAlzheimerIGIDetails from '../pages/books/AIDrivenAlzheimerIGIDetails';
import QuantumMachineLearningDeGruyterDetails from '../pages/books/quantum-machine-learning-degruyter-details';
import CFC from '../pages/cfc';
import SecureEnergyWileyCFCDetails from '../pages/cfc/secure-energy-wiley-cfc-details';
import MultimodalDataFusionCFCDetails from '../pages/cfc/multimodal-data-fusion-wiley-cfc-details';
import IoMForHealthcareCFCDetails from '../pages/cfc/iom-for-healthcare-wiley-cfc-details';
import KwizzleMobileAppDetailsDetails from '../pages/projects/kwizzle-mobile-app-details';
import Blog from '../pages/blog';
import BlogDetails from '../pages/blog/blog-details';
import Contact from '../pages/contact';
import Publications from '../pages/about/publications';

import Preloader from "../components/Preloader";
import ScrollToTop from '../components/ScrollTop';
import LoadTop from '../components/ScrollTop/LoadTop'

import LoadTop from '../components/ScrollTop/LoadTop';

const App = () => {
const [isLoading, setIsLoading] = useState(true);

function handleRouteChange(location) {

const wow = new WOW.WOW({
live: false
});
Expand All @@ -94,20 +65,14 @@ const App = () => {

return (
<div className='App'>
{isLoading ?
<Preloader /> : ''
}
{isLoading ? <Preloader /> : ''}
<>
<ScrollToTop />
<LoadTop />
<Routes>
<Route path="/" exact element={<Home />} />
<Route path="/home-2" element={<HomeTwo />} />
<Route path="/about-me" element={<AboutMe />} />
<Route path="/publications" element={<Publications />} />
{/* <Route path="/home-3" element={<HomeThree />} />
<Route path="/home-4" element={<HomeFour />} />
<Route path="/home-5" element={<HomeFive />} /> */}
<Route path="/appointments" element={<Appointments />} />
<Route path="/service-details" element={<ServiceDetails />} />
<Route path="/services" element={<Services />} />
Expand All @@ -118,12 +83,7 @@ const App = () => {
<Route path="/services/publication-assistance" element={<PublicationAssistanceDetails />} />
<Route path="/services/training-and-workshops" element={<TrainingAndWorkshopsDetails />} />
<Route path="/projects" element={<Projects />} />
<Route path="/project-1" element={<ProjectOne />} />
<Route path="/project-2" element={<ProjectTwo />} />
<Route path="/project-masonary" element={<ProjectMasonary />} />
<Route path="/project-details" element={<ProjectDetails />} />
<Route path="/product" element={<Product />} />
<Route path="/product-details" element={<ProductDetails />} />
<Route path="/certificates" element={<Certificates />} />
<Route path="/study-notes" element={<StudyNotes />} />
<Route path="/machine-learning-notes" element={<MLNotes />} />
Expand All @@ -132,27 +92,12 @@ const App = () => {
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
<Route path="/disclaimer" element={<Disclaimer />} />
<Route path="/books" element={<Books />} />
<Route path="/books/applying-ml-in-bioinformatics-igi" element={<ApplyingMLInBioinformaticsIGIDetails />} />
<Route path="/books/innovations-in-ml-iot-water-management-igi" element={<InnovationsInMLIoTWaterManagementIGIDetails />} />
<Route path="/books/quantum-in-biomedical-igi" element={<QuantumInBiomedicalIGIDetails />} />
<Route path="/books/ai-driven-alzheimer-disease-prediction-igi" element={<AIDrivenAlzheimerIGIDetails />} />
<Route path="/books/quantum-machine-learning-degruyter" element={<QuantumMachineLearningDeGruyterDetails />} />
<Route path="/books/:bookId" element={<BooksDetails />} />
<Route path="/call-for-chapters" element={<CFC />} />
<Route path="/call-for-chapters/secure-energy-wiley" element={<SecureEnergyWileyCFCDetails />} />
<Route path="/call-for-chapters/multimodal-data-fusion-wiley" element={<MultimodalDataFusionCFCDetails />} />
<Route path="/call-for-chapters/iom-for-healthcare-wiley" element={<IoMForHealthcareCFCDetails />} />
<Route path="/projects/kwizzle-mobile-app" element={<KwizzleMobileAppDetailsDetails />} />
{/* <Route path="/job" element={<Job />} />
<Route path="/job-details" element={<JobDetails />} />
<Route path="/faq" element={<Faq />} />
<Route path="/price" element={<Price />} /> */}
<Route path="/testimonial" element={<Testimonial />} />
{/* <Route path="/blog" element={<Blog />} /> */}
{/* <Route path="/blog-details" element={<BlogDetails />} /> */}
<Route path="/cart" element={<Cart />} />
<Route path="/checkout" element={<Checkout />} />
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />
<Route path="/contact" element={<Contact />} />
<Route path="*" element={<Error />} />
</Routes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// src/components/CallForChapterDetails.js

import React from 'react';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';

const index = ({
const BookDetailsPage = ({
title,
price,
publisher,
Expand Down Expand Up @@ -104,4 +103,4 @@ const index = ({
);
}

export default index;
export default BookDetailsPage;
2 changes: 1 addition & 1 deletion src/components/Books/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const index = () => {
Title={book.title.text}
Publisher={book.publisher}
Price={book.price}
Url={`books/${book.permalink}`}
Url={`books/${book.id}`}
/>
</div>
))}
Expand Down
33 changes: 33 additions & 0 deletions src/components/RelatedBooks/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// src/components/RelatedBooks.js

import React from 'react';
import SingleProduct from '../Product';

const index = ({ relatedBooks }) => {
return (
<div className="container">
<div className="row">
<div className="col-xl-12">
<div className="product__title-sm wow animate__fadeInUp" data-wow-duration="1.1s">
<h4>Showing all Related Products:</h4>
</div>
</div>
</div>
<div className="row">
{relatedBooks.map((book) => (
<div className="col-xl-4 col-lg-6 col-md-6 col-sm-6 mb-30 wow animate__fadeInUp" data-wow-duration="1.1s" key={book.id}>
<SingleProduct
Image={book.title.image}
Title={book.title.text}
Publisher={book.publisher}
Price={book.price}
Url={`/books/${book.permalink}`}
/>
</div>
))}
</div>
</div>
);
};

export default index;
7 changes: 1 addition & 6 deletions src/data/booksData.js

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

24 changes: 0 additions & 24 deletions src/pages/books/AIDrivenAlzheimerIGIDetails.js

This file was deleted.

54 changes: 0 additions & 54 deletions src/pages/books/AIDrivenAlzheimerIGIDetailsMain.js

This file was deleted.

54 changes: 0 additions & 54 deletions src/pages/books/ApplyingMLInBioinformaticsIGIDetailsMain.js

This file was deleted.

Loading

0 comments on commit 01e95c9

Please sign in to comment.