2020-04-14 10:53:19 +03:00
|
|
|
import React from "react";
|
|
|
|
import { Route, Switch } from "react-router-dom";
|
|
|
|
import HomePage from "./home/HomePage";
|
|
|
|
import AboutPage from "./about/AboutPage";
|
|
|
|
import Header from "./common/Header";
|
|
|
|
import PageNotFound from "./PageNotFound";
|
|
|
|
import CoursesPage from "./courses/CoursesPage";
|
2020-05-06 10:06:26 +03:00
|
|
|
import ManageCoursePage from "./courses/ManageCoursePage";
|
2020-04-14 10:53:19 +03:00
|
|
|
import { ToastContainer } from "react-toastify";
|
|
|
|
import "react-toastify/dist/ReactToastify.css";
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
return (
|
|
|
|
<div className="container-fluid">
|
|
|
|
<Header />
|
|
|
|
<Switch>
|
|
|
|
<Route exact path="/" component={HomePage} />
|
|
|
|
<Route path="/about" component={AboutPage} />
|
|
|
|
<Route path="/courses" component={CoursesPage} />
|
|
|
|
<Route path="/course/:slug" component={ManageCoursePage} />
|
|
|
|
<Route path="/course" component={ManageCoursePage} />
|
|
|
|
<Route component={PageNotFound} />
|
|
|
|
</Switch>
|
|
|
|
<ToastContainer autoClose={3000} />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|