Просмотр исходного кода

basically working. need to connect reducers and actions.

Tomi Cvetic 7 лет назад
Родитель
Сommit
6a7ac3547e

+ 4 - 2
src/Main.js

@@ -359,6 +359,8 @@ class Main extends React.Component {
   }
 
   render () {
+    const Pli = PlayerList.components.PlayerList
+    const Mli = MatchList.components.MatchList
     const places = this.props.matchList.places || []
     const dates = this.props.matchList.dates || {}
     const matchCategories = this.props.matchList.categories || []
@@ -407,10 +409,10 @@ class Main extends React.Component {
           <button onClick={this.generatePayTable} disabled={(!this.props.matchList.filteredMatches.length | !this.props.playerList.filteredPlayers.length)}>Zahlliste generieren</button>
           <button onClick={this.generatePhoneList} disabled={!this.props.playerList.allPlayers.length}>Telefonliste generieren</button>
         </form>
-        <MatchList match={this.props.matchList} />
+        <Mli match={this.props.matchList} />
         <PhoneList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
         <EmailList filtered={this.props.matchList.filteredMatches} players={this.props.playerList.allPlayers} />
-        <PlayerList player={this.props.playerList} />
+        <Pli player={this.props.playerList} />
       </div>
     )
   }

+ 3 - 2
src/matchList/components/MatchList.js

@@ -3,8 +3,9 @@ import MatchDisp from './MatchDisp'
 
 class MatchList extends React.Component {
   render () {
-    const matches = this.props.match.matches
-    const filtered = this.props.match.filtered
+    console.log(this.props)
+    const matches = this.props.match.allMatches
+    const filtered = this.props.match.filteredMatches
 
     return (
       <div>

+ 4 - 1
src/matchList/components/index.js

@@ -1 +1,4 @@
-export default {}
+import MatchList from './MatchList'
+import MatchDisp from './MatchDisp'
+
+export default { MatchList, MatchDisp }

+ 2 - 1
src/playerList/components/PlayerList.js

@@ -3,7 +3,8 @@ import PlayerDisp from './PlayerDisp'
 
 class PlayerList extends React.Component {
   render () {
-    const filtered = this.props.player.filtered
+    console.log(this.props)
+    const filtered = this.props.player.filteredPlayers
 
     return (
       <div>