-
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.
indentation size changed from 4 to 2
- Loading branch information
Showing
9 changed files
with
451 additions
and
458 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React, {Component} from 'react'; | ||
|
||
const Footer = () => ( | ||
<footer className="footer text-center"> | ||
Copyrights © {new Date().getFullYear() } || ReactUniversal ShoppingApp | ||
</footer> | ||
<footer className="footer text-center"> | ||
Copyrights © {new Date().getFullYear() } || ReactUniversal ShoppingApp | ||
</footer> | ||
) | ||
|
||
export default Footer; |
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 |
---|---|---|
@@ -1,36 +1,34 @@ | ||
import React, {Component} from 'react'; | ||
import Navigation from 'Navigation'; | ||
import Footer from 'Footer'; | ||
|
||
import {connect} from 'react-redux'; | ||
import {bindActionCreators} from 'redux'; | ||
import {getCart} from 'cartActions'; | ||
|
||
|
||
|
||
class Main extends Component { | ||
render() { | ||
return( | ||
<div> | ||
<Navigation cartItems={this.props.totalQuantity} /> | ||
{this.props.children} | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
render() { | ||
return( | ||
<div> | ||
<Navigation cartItems={this.props.totalQuantity} /> | ||
{this.props.children} | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
|
||
function mapStateToProps(state) { | ||
return { | ||
totalQuantity: state.cart.totalQuantity | ||
} | ||
return { | ||
totalQuantity: state.cart.totalQuantity | ||
} | ||
} | ||
|
||
function mapDispatchToProps(dispatch) { | ||
return bindActionCreators({ | ||
getCart | ||
}, dispatch); | ||
return bindActionCreators({ | ||
getCart | ||
}, dispatch); | ||
} | ||
|
||
export default connect(mapStateToProps)(Main); |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React, {Component} from 'react'; | ||
|
||
const About = () => ( | ||
<div> | ||
<h1>About</h1> | ||
</div> | ||
<div> | ||
<h1>About</h1> | ||
</div> | ||
); | ||
|
||
export default About; |
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.