Browse Source

[feat] add 404

Signed-off-by: Muthu Kumar <muthukumar@thefeathers.in>
pull/1/head
Muthu Kumar 4 years ago
parent
commit
dbc260c674
Signed by: mkrhere GPG Key ID: 3FD688398897097E
  1. 3
      src/App.js
  2. 8
      src/index.css
  3. 28
      src/pages/404.js

3
src/App.js

@ -3,6 +3,7 @@ import { Router } from "@reach/router";
import Home from "./pages/Home";
import Exp from "./pages/Exp";
import Projects from "./pages/Projects";
import NotFound from "./pages/404";
function App() {
return (
@ -10,6 +11,8 @@ function App() {
<Home path="/" />
<Exp path="/experience" />
<Projects path="/projects" />
<NotFound path="*" />
</Router>
);
}

8
src/index.css

@ -50,3 +50,11 @@ h1 {
h2 {
font-size: 3rem;
}
a {
color: white;
}
a:hover {
color: var(--primary-color);
}

28
src/pages/404.js

@ -0,0 +1,28 @@
import { css } from "emotion";
import Container from "../components/Container";
import Heading from "../components/Heading";
const Dashed = props => (
<span
className={css`
border-bottom: 1px dashed #fff;
`}>
{props.children}
</span>
);
function Home() {
return (
<Container>
<Heading>Nothing here</Heading>
<p>
404. Back to{" "}
<b>
<a href="/">MKRhere?</a>
</b>
</p>
</Container>
);
}
export default Home;
Loading…
Cancel
Save