-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add routing based on react-router and react-router-dom
- Loading branch information
Showing
16 changed files
with
354 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,5 @@ | |
"config": "./webpack.config.base.js" | ||
} | ||
} | ||
}, | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { | ||
ErrorPageContainer, ErrorText, | ||
} from './styled'; | ||
|
||
|
||
const ErrorComponent = () => ( | ||
<ErrorPageContainer> | ||
<ErrorText> | ||
404 page not found | ||
</ErrorText> | ||
</ErrorPageContainer> | ||
); | ||
|
||
export default ErrorComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ErrorComponent from './ErrorComponent'; | ||
|
||
export default ErrorComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const ErrorPageContainer = styled.div` | ||
position: absolute; | ||
display: flex; | ||
justify-content:center; | ||
align-items: center; | ||
top: 0; | ||
bottom: 0; | ||
right: 0; | ||
left: 0; | ||
`; | ||
|
||
export const ErrorText = styled.span` | ||
font-size: 30px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { | ||
Link, | ||
} from 'react-router-dom'; | ||
import | ||
{ | ||
NavigationContainer, LinksElement, ListLinks, | ||
} from './styled'; | ||
|
||
|
||
const HomeComponent = () => ( | ||
<NavigationContainer> | ||
<ListLinks> | ||
|
||
<LinksElement> | ||
<Link to="/products">Products</Link> | ||
</LinksElement> | ||
|
||
<LinksElement> | ||
<Link to="/generator">Generator</Link> | ||
</LinksElement> | ||
|
||
</ListLinks> | ||
</NavigationContainer> | ||
); | ||
|
||
export default HomeComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import HomeComponent from './HomeComponent'; | ||
|
||
export default HomeComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import styled from 'styled-components'; | ||
|
||
|
||
export const NavigationContainer = styled.div` | ||
background: linear-gradient(45deg, rgba(255,255,255,1) 0%, rgba(0,255,255,1) 100%); | ||
position: absolute; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
top: 0; | ||
bottom:0; | ||
right: 0; | ||
left: 0; | ||
`; | ||
|
||
|
||
export const ListLinks = styled.ul` | ||
list-style-type: none; | ||
margin: 0 auto; | ||
padding:0; | ||
`; | ||
|
||
|
||
export const LinksElement = styled.li` | ||
display: inline; | ||
margin: 20px; | ||
font-size: 25px; | ||
border-bottom: none; | ||
transition: border-bottom 220ms ease-out; | ||
&:hover { | ||
border-bottom: 2px solid white; | ||
transition: border-bottom 220ms ease-out, color 220ms ease-out; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.