Skip to content

Commit 52d2ab7

Browse files
committed
Add NotFound page
1 parent 6f8ddbd commit 52d2ab7

File tree

4 files changed

+38
-1
lines changed

4 files changed

+38
-1
lines changed

client/src/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
22
import { Router } from '@reach/router';
33
import { GlobalStyle } from './globalStyle';
4-
54
import Header from './containers/Header';
65
import Home from './containers/Home';
76
import Movie from './containers/Movie';
7+
import NotFound from './containers/NotFound';
88

99
const App = () => {
1010
return (
@@ -13,6 +13,7 @@ const App = () => {
1313
<Router>
1414
<Home path='/' />
1515
<Movie path='/movie/:movieID/*' />
16+
<NotFound default />
1617
</Router>
1718
<GlobalStyle />
1819
</>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
import { Container, Heading, Text } from './styles';
3+
4+
const NotFound = () => {
5+
return (
6+
<Container>
7+
<Heading>404 - Page Not Found</Heading>
8+
<Text>Sorry, the page you are looking for does not exist.</Text>
9+
</Container>
10+
);
11+
};
12+
13+
export default NotFound;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import styled from 'styled-components';
2+
3+
export const Container = styled.div`
4+
display: flex;
5+
flex-direction: column;
6+
justify-content: center;
7+
align-items: center;
8+
height: 90vh;
9+
`;
10+
11+
export const Heading = styled.h1`
12+
font-size: 4rem;
13+
font-weight: 700;
14+
color: var(--secondaryColor);
15+
margin-bottom: 1rem;
16+
`;
17+
18+
export const Text = styled.p`
19+
font-size: 1.5rem;
20+
color: var(--lightGrey);
21+
margin-bottom: 2rem;
22+
`;

client/src/globalStyle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const GlobalStyle = createGlobalStyle`
1616
margin: 0;
1717
padding: 0;
1818
box-sizing: border-box;
19+
background-color: rgb(242, 242, 242);
1920
}
2021
2122
a {

0 commit comments

Comments
 (0)