|
@@ -4,8 +4,8 @@ import thunk from 'redux-thunk';
|
|
import {createStore, combineReducers, applyMiddleware} from 'redux';
|
|
import {createStore, combineReducers, applyMiddleware} from 'redux';
|
|
import {Provider, connect} from 'react-redux';
|
|
import {Provider, connect} from 'react-redux';
|
|
import {useEffect, useState} from 'react';
|
|
import {useEffect, useState} from 'react';
|
|
-import {Router, Route, Link, Redirect, match} from 'react-router-dom';
|
|
|
|
-import {createBrowserHistory} from 'history';
|
|
|
|
|
|
+import { Router, Route, Link, Redirect, match, BrowserRouter } from 'react-router-dom';
|
|
|
|
+import createHistory from "history/createBrowserHistory";
|
|
|
|
|
|
|
|
|
|
const actionPending = name => ({type: 'PROMISE', status: 'PENDING', name});
|
|
const actionPending = name => ({type: 'PROMISE', status: 'PENDING', name});
|
|
@@ -511,7 +511,6 @@ const Main = () =>
|
|
<main className="main">
|
|
<main className="main">
|
|
<Aside/>
|
|
<Aside/>
|
|
<Content>
|
|
<Content>
|
|
-
|
|
|
|
<Route path="/" component={PageMain} exact/>
|
|
<Route path="/" component={PageMain} exact/>
|
|
<Route path="/category/:_id" component={CPageCategory} exact/>
|
|
<Route path="/category/:_id" component={CPageCategory} exact/>
|
|
<Route path="/cart" component={CCart} exact/>
|
|
<Route path="/cart" component={CCart} exact/>
|
|
@@ -532,7 +531,7 @@ const Footer = () =>
|
|
<Logo/>
|
|
<Logo/>
|
|
</footer>;
|
|
</footer>;
|
|
|
|
|
|
-const history = createBrowserHistory();
|
|
|
|
|
|
+const history = require('history').createBrowserHistory();
|
|
|
|
|
|
//import {Provider, connect} from 'react-redux';
|
|
//import {Provider, connect} from 'react-redux';
|
|
function App() {
|
|
function App() {
|