PageNotFound

master
Tudor Stanciu 2020-04-11 02:09:47 +03:00
parent 8fce4efb4f
commit f797a34bc4
2 changed files with 12 additions and 3 deletions

View File

@ -1,15 +1,19 @@
import React from "react";
import { Route } from "react-router-dom";
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";
function App() {
return (
<div className="container-fluid">
<Header />
<Switch>
<Route exact path="/" component={HomePage} />
<Route path="/about" component={AboutPage} />
<Route component={PageNotFound} />
</Switch>
</div>
);
}

View File

@ -0,0 +1,5 @@
import React from "react";
const PageNotFound = () => <h1>Oops! Page not found</h1>;
export default PageNotFound;