mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2024-07-05 15:42:18 -07:00
24 lines
576 B
JavaScript
24 lines
576 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
|
|
import "./App.css";
|
|
import QuoteBox from "./QuoteBox";
|
|
|
|
const mapStateToProps = (state) => ({ ...state });
|
|
|
|
class App extends React.Component {
|
|
render() {
|
|
const colors = ["red-background", "blue-background", "yellow-background"];
|
|
const appHeaderClass = "App-header " + colors[this.props.colorCount];
|
|
return (
|
|
<div className="App">
|
|
<header className={appHeaderClass}>
|
|
<QuoteBox />
|
|
</header>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default connect(mapStateToProps)(App);
|