PageNotFound
parent
8fce4efb4f
commit
f797a34bc4
|
@ -1,15 +1,19 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Route } from "react-router-dom";
|
import { Route, Switch } from "react-router-dom";
|
||||||
import HomePage from "./home/HomePage";
|
import HomePage from "./home/HomePage";
|
||||||
import AboutPage from "./about/AboutPage";
|
import AboutPage from "./about/AboutPage";
|
||||||
import Header from "./common/Header";
|
import Header from "./common/Header";
|
||||||
|
import PageNotFound from "./PageNotFound";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<div className="container-fluid">
|
<div className="container-fluid">
|
||||||
<Header />
|
<Header />
|
||||||
<Route exact path="/" component={HomePage} />
|
<Switch>
|
||||||
<Route path="/about" component={AboutPage} />
|
<Route exact path="/" component={HomePage} />
|
||||||
|
<Route path="/about" component={AboutPage} />
|
||||||
|
<Route component={PageNotFound} />
|
||||||
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const PageNotFound = () => <h1>Oops! Page not found</h1>;
|
||||||
|
|
||||||
|
export default PageNotFound;
|
Loading…
Reference in New Issue