|
@@ -3,7 +3,7 @@ import "./App.css";
|
|
import Header from "./Header/header";
|
|
import Header from "./Header/header";
|
|
import Navigation from "./Content/Navigation/navigation";
|
|
import Navigation from "./Content/Navigation/navigation";
|
|
import News from "./Content/News/news";
|
|
import News from "./Content/News/news";
|
|
-import { Redirect, Route } from "react-router-dom";
|
|
|
|
|
|
+import { Redirect, Route, Router, Switch } from "react-router-dom";
|
|
import Music from "./Content/Music/music";
|
|
import Music from "./Content/Music/music";
|
|
import Profile from "./Content/Profile/profile";
|
|
import Profile from "./Content/Profile/profile";
|
|
import Settings from "./Content/Settings/settings";
|
|
import Settings from "./Content/Settings/settings";
|
|
@@ -12,9 +12,14 @@ import Registration from "./Content/Registration/Registration";
|
|
import Users from "./Content/Users/users";
|
|
import Users from "./Content/Users/users";
|
|
import Messages from "./Content/Messages/messages";
|
|
import Messages from "./Content/Messages/messages";
|
|
import Page404 from "./Components/404_Page/404_Page";
|
|
import Page404 from "./Components/404_Page/404_Page";
|
|
|
|
+import { store } from "./Redux/promise_reducer";
|
|
|
|
+import { Provider } from "react-redux";
|
|
|
|
+import history from "./history";
|
|
|
|
|
|
function App() {
|
|
function App() {
|
|
return (
|
|
return (
|
|
|
|
+ <Provider store={store}>
|
|
|
|
+ <Router history={history}>
|
|
<div className="app-wrapper">
|
|
<div className="app-wrapper">
|
|
<Header />
|
|
<Header />
|
|
|
|
|
|
@@ -23,8 +28,9 @@ function App() {
|
|
|
|
|
|
<div className="app-wrapper-content">
|
|
<div className="app-wrapper-content">
|
|
{/* <Redirect exact from="/" to="/profile" /> */}
|
|
{/* <Redirect exact from="/" to="/profile" /> */}
|
|
- <Route
|
|
|
|
- path="/profile"
|
|
|
|
|
|
+ <Switch>
|
|
|
|
+ {/* <Route
|
|
|
|
+ path="/profile"
|
|
render={() => <Profile />}
|
|
render={() => <Profile />}
|
|
/>
|
|
/>
|
|
<Route
|
|
<Route
|
|
@@ -38,15 +44,18 @@ function App() {
|
|
<Route
|
|
<Route
|
|
path="/404"
|
|
path="/404"
|
|
render={() => <Page404 /> }
|
|
render={() => <Page404 /> }
|
|
- />
|
|
|
|
|
|
+ /> */}
|
|
<Route path="/news" component={News} />
|
|
<Route path="/news" component={News} />
|
|
<Route path="/music" component={Music} />
|
|
<Route path="/music" component={Music} />
|
|
<Route path="/settings" component={Settings} />
|
|
<Route path="/settings" component={Settings} />
|
|
<Route path="/login" component={Login} />
|
|
<Route path="/login" component={Login} />
|
|
<Route path="/registration" component={Registration} />
|
|
<Route path="/registration" component={Registration} />
|
|
|
|
+ </Switch>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </Router>
|
|
|
|
+ </Provider>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|