Bläddra i källkod

change counter

John 8 år sedan
förälder
incheckning
2f562f6689

+ 13 - 0
src/routes/Counter/components/CounterView.js

@@ -0,0 +1,13 @@
+import React from 'react'
+import Counter from '../../../components/Counter'
+
+export const CounterView = (props) => (
+  <div>
+    <Counter
+      counter={props.counter}
+      doubleAsync={props.doubleAsync}
+      increment={props.increment} />
+  </div>
+)
+
+export default CounterView

+ 2 - 2
src/routes/Counter/containers/CounterContainer.js

@@ -6,7 +6,7 @@ import { increment, doubleAsync } from '../modules/counter'
     wiring in the actions and state necessary to render a presentational
     wiring in the actions and state necessary to render a presentational
     component - in this case, the counter:   */
     component - in this case, the counter:   */
 
 
-import Counter from '../../../components/Counter'
+import CounterView from '../components/CounterView'
 
 
 /*  Object of action creators (can also be function that returns object).
 /*  Object of action creators (can also be function that returns object).
     Keys will be passed as props to presentational components. Here we are
     Keys will be passed as props to presentational components. Here we are
@@ -35,4 +35,4 @@ const mapStateToProps = (state) => ({
     Selectors are composable. They can be used as input to other selectors.
     Selectors are composable. They can be used as input to other selectors.
     https://github.com/reactjs/reselect    */
     https://github.com/reactjs/reselect    */
 
 
-export default connect(mapStateToProps, mapActionCreators)(Counter)
+export default connect(mapStateToProps, mapActionCreators)(CounterView)

+ 1 - 1
src/routes/home/components/HomeView.scss

@@ -1,5 +1,5 @@
 .duck {
 .duck {
   display: block;
   display: block;
   width: 120px;
   width: 120px;
-  margin: 1.5rem auto;
+  margin: auto;
 }
 }

+ 1 - 1
src/static/index.html

@@ -3,7 +3,7 @@
   <head>
   <head>
     <meta charset="utf-8">
     <meta charset="utf-8">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title></title>
+    <title>React Redux Starter Kit</title>
     <meta name="description" content="">
     <meta name="description" content="">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="apple-touch-icon" href="apple-touch-icon.png">
     <link rel="apple-touch-icon" href="apple-touch-icon.png">