Videos Page Not Showing In Desktop Version (Redirects To Products)

temp
Pedram Keshavarzi 3 years ago
parent b445010ce2
commit 95032e76cd
  1. 13
      src/router.js

@ -1,5 +1,6 @@
import React, { useEffect } from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { BrowserRouter, Routes, Route, } from "react-router-dom";
import { Navigate } from 'react-router-dom';
import { connect } from "react-redux";
import { publicApi } from "./redux/actions";
import Navbar from "./components/Navbar";
@ -154,10 +155,11 @@ function Router({
/>
}
/>
<Route
path="/videos"
<Route
path='/videos'
exact
element={
isMobile ?
<Videos
headerOptions={{
logo: true,
@ -168,9 +170,10 @@ function Router({
shown: true,
menu: false,
}}
/>
/> : <Navigate replace to="/products" />
}
/>
>
</Route>
<Route
path="/videos/:id"
exact

Loading…
Cancel
Save