update router.js, src/views/Home/Desktop/index.js and src/views/Home/Portrait/Public/Header/index.js

master
Reza_ashrafi 2 years ago
parent 552c12e29d
commit b6141a8a92
  1. 19
      src/router.js
  2. 11
      src/views/Home/Desktop/index.js
  3. 4
      src/views/Home/Portrait/Public/Header/index.js

@ -1,5 +1,5 @@
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom"; import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom";
import { Navigate } from "react-router-dom"; import { Navigate } from "react-router-dom";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { import {
@ -10,11 +10,14 @@ import {
book, book,
blog, blog,
} from "./redux/actions"; } from "./redux/actions";
//components
import Navbar from "./components/Navbar"; import Navbar from "./components/Navbar";
import BG from "./components/BG"; import BG from "./components/BG";
import BottomNavigation from "./components/BottomNavigation"; import BottomNavigation from "./components/BottomNavigation";
import FooterDesign1 from "./components/Footer";
import _ from "lodash"; //pages
import Home from "./views/Home"; import Home from "./views/Home";
import Auth from "./views/Auth"; import Auth from "./views/Auth";
import Products from "./views/Products"; import Products from "./views/Products";
@ -33,7 +36,6 @@ import Activation from "./views/Activation";
import Faq from "./views/Faq"; import Faq from "./views/Faq";
import Contact from "./views/Contact"; import Contact from "./views/Contact";
import Dashboard from "./views/Dashboard"; import Dashboard from "./views/Dashboard";
import FooterDesign1 from "./components/Footer";
import Blogs from "./views/Blogs"; import Blogs from "./views/Blogs";
import Blog from "./views/Blog"; import Blog from "./views/Blog";
import About from "./views/About"; import About from "./views/About";
@ -110,14 +112,9 @@ function Router({
return ( return (
<div className={`${isDark ? "dark" : ""}`}> <div className={`${isDark ? "dark" : ""}`}>
<div <div
className={_.join( className={`min-h-screen min-w-screen rtl overflow-x-hidden lg:py-0 ${
[ isDark ? "" : "bg-white"
"min-h-screen min-w-screen rtl overflow-x-hidden lg:py-0", } ${headerOptions?.shown ? "pt-16" : "pt-0"}`}
isDark ? "" : "bg-white",
headerOptions?.shown ? "pt-16" : "pt-0",
],
" "
)}
> >
{menu && ( {menu && (
<div <div

@ -1,10 +1,13 @@
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import SalesContainer from "./SalesContainer";
import { publicApi } from "../../../redux/actions"; import { publicApi } from "../../../redux/actions";
import Part2 from "./Part2";
//assets
import HomeImg from "../../../assets/images/HomeImg.png"; import HomeImg from "../../../assets/images/HomeImg.png";
//components
import SalesContainer from "./SalesContainer";
import Part2 from "./Part2";
import Part4 from "./Part4"; import Part4 from "./Part4";
import Design2D from "../../../components/Design2D"; import Design2D from "../../../components/Design2D";
@ -68,7 +71,7 @@ const DesktopHome = ({ grades, books }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isDark: state.publicApi.isDark, isDark: state.publicApi.isDark,
isMobile: state.publicApi.isMobile, isMobile: state.config.device === 'mobile',
books: state.book.list, books: state.book.list,
gradeFilterBooks: state.book.gradeFilterBooks, gradeFilterBooks: state.book.gradeFilterBooks,
selectedGrade: state.book.selectedGrade, selectedGrade: state.book.selectedGrade,

@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
import { Carousel } from "@trendyol-js/react-carousel"; import { Carousel } from "@trendyol-js/react-carousel";
//components //components
import Video from "../../../../../components/JolPlayer"; // import Video from "../../../../../components/JolPlayer";
import Book from "../../../Landscape/Page1/Book"; import Book from "../../../Landscape/Page1/Book";
import Lights from "../../../Landscape/Page1/Lights"; import Lights from "../../../Landscape/Page1/Lights";
@ -11,7 +11,7 @@ import Lights from "../../../Landscape/Page1/Lights";
import arrow from "../../../../../assets/icons/dropdown-blue.svg"; import arrow from "../../../../../assets/icons/dropdown-blue.svg";
import sheffImage from "../../../../../assets/images/sheff.svg"; import sheffImage from "../../../../../assets/images/sheff.svg";
import flatFlower from "../../../../../assets/icons/flat-flower-white.svg"; import flatFlower from "../../../../../assets/icons/flat-flower-white.svg";
import jojoImage from "../../../../../assets/images/jojo.svg"; // import jojoImage from "../../../../../assets/images/jojo.svg";
function Header({ bookList }) { function Header({ bookList }) {
const [show, setShow] = useState(2); const [show, setShow] = useState(2);

Loading…
Cancel
Save