Conditions | 1 |
Total Lines | 194 |
Code Lines | 180 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | import React, { Component } from "react" |
||
9 | render() { |
||
10 | const wedstrijd1 = { |
||
11 | region: "bra", |
||
12 | division: "BVZ", |
||
13 | dateTime: 1564596000000, |
||
14 | home: "FC Zemst Sp", |
||
15 | away: "KCVV Elewijt", |
||
16 | resultHome: "2", |
||
17 | resultAway: "2", |
||
18 | status: "", |
||
19 | // matchDay, |
||
20 | regNumberHome: "03746", |
||
21 | regNumberAway: "00055", |
||
22 | } |
||
23 | const wedstrijd2 = { |
||
24 | region: "bra", |
||
25 | division: "BCA", |
||
26 | dateTime: 1564927200000, |
||
27 | home: "KCVV Elewijt", |
||
28 | away: "Groot Dilbeek A", |
||
29 | resultHome: "0", |
||
30 | resultAway: "9", |
||
31 | status: "", |
||
32 | // matchDay, |
||
33 | regNumberHome: "00055", |
||
34 | regNumberAway: "06325", |
||
35 | } |
||
36 | const wedstrijd3 = { |
||
37 | region: "bra", |
||
38 | division: "FR", |
||
39 | dateTime: 1565200800000, |
||
40 | home: "KCS Machelen", |
||
41 | away: "KCVV Elewijt", |
||
42 | resultHome: "2", |
||
43 | resultAway: "4", |
||
44 | status: "", |
||
45 | // matchDay, |
||
46 | regNumberHome: "00628", |
||
47 | regNumberAway: "00055", |
||
48 | } |
||
49 | const wedstrijd4 = { |
||
50 | region: "bra", |
||
51 | division: "FR", |
||
52 | dateTime: 1565283600000, |
||
53 | home: "K GR Katelijne", |
||
54 | away: "KCVV Elewijt", |
||
55 | resultHome: "1", |
||
56 | resultAway: "0", |
||
57 | status: "", |
||
58 | // matchDay, |
||
59 | regNumberHome: "03019", |
||
60 | regNumberAway: "00055", |
||
61 | } |
||
62 | const wedstrijd5 = { |
||
63 | region: "bra", |
||
64 | division: "BCA", |
||
65 | dateTime: 1565532000000, |
||
66 | home: "BOKA United A", |
||
67 | away: "KCVV Elewijt", |
||
68 | resultHome: "0", |
||
69 | resultAway: "9", |
||
70 | status: "", |
||
71 | // matchDay, |
||
72 | regNumberHome: "06439", |
||
73 | regNumberAway: "00055", |
||
74 | } |
||
75 | const wedstrijd6 = { |
||
76 | region: "bra", |
||
77 | division: "BVZ", |
||
78 | dateTime: 1565719200000, |
||
79 | home: "KCVV Elewijt", |
||
80 | away: "KFC Eppegem", |
||
81 | resultHome: "7", |
||
82 | resultAway: "1", |
||
83 | status: "", |
||
84 | // matchDay, |
||
85 | regNumberHome: "00055", |
||
86 | regNumberAway: "04759", |
||
87 | } |
||
88 | const wedstrijd7 = { |
||
89 | region: "bra", |
||
90 | division: "FR", |
||
91 | dateTime: 1566133200000, |
||
92 | home: "KCVV Elewijt A", |
||
93 | away: "KFC Eppegem A", |
||
94 | resultHome: "0", |
||
95 | resultAway: "2", |
||
96 | status: "", |
||
97 | // matchDay, |
||
98 | regNumberHome: "00055", |
||
99 | regNumberAway: "04759", |
||
100 | } |
||
101 | const wedstrijd9 = { |
||
102 | region: "bra", |
||
103 | division: "BCA", |
||
104 | dateTime: 1566741600000, |
||
105 | home: "Borght-Humbeek A", |
||
106 | away: "KCVV Elewijt", |
||
107 | resultHome: "1", |
||
108 | resultAway: "2", |
||
109 | status: "", |
||
110 | // matchDay, |
||
111 | regNumberHome: "00039", |
||
112 | regNumberAway: "00055", |
||
113 | } |
||
114 | const wedstrijd10 = { |
||
115 | region: "bra", |
||
116 | division: "FR", |
||
117 | dateTime: 1565805600000, |
||
118 | home: "Borght-Humbeek B", |
||
119 | away: "KCVV Elewijt B", |
||
120 | resultHome: "5", |
||
121 | resultAway: "1", |
||
122 | status: "", |
||
123 | // matchDay, |
||
124 | regNumberHome: "00039", |
||
125 | regNumberAway: "00055", |
||
126 | } |
||
127 | const wedstrijd11 = { |
||
128 | region: "bra", |
||
129 | division: "BVZ", |
||
130 | dateTime: 1565874000000, |
||
131 | home: "KCVV Elewijt A", |
||
132 | away: "VK Weerde", |
||
133 | resultHome: "6", |
||
134 | resultAway: "0", |
||
135 | status: "", |
||
136 | // matchDay, |
||
137 | regNumberHome: "00055", |
||
138 | regNumberAway: "06354", |
||
139 | } |
||
140 | const wedstrijd12 = { |
||
141 | region: "bra", |
||
142 | division: "BCA", |
||
143 | dateTime: 1566406800000, |
||
144 | home: "KCVV Elewijt A", |
||
145 | away: "Rhod.-De Hoek A", |
||
146 | resultHome: "2", |
||
147 | resultAway: "2", |
||
148 | status: "", |
||
149 | // matchDay, |
||
150 | regNumberHome: "00055", |
||
151 | regNumberAway: "00006", |
||
152 | } |
||
153 | const wedstrijd13 = { |
||
154 | region: "bra", |
||
155 | division: "FR", |
||
156 | dateTime: 1566410400000, |
||
157 | home: "KCVV Elewijt B", |
||
158 | away: "FC Beigem B", |
||
159 | resultHome: "2", |
||
160 | resultAway: "2", |
||
161 | status: "", |
||
162 | // matchDay, |
||
163 | regNumberHome: "00055", |
||
164 | regNumberAway: "07753", |
||
165 | } |
||
166 | const wedstrijd14 = { |
||
167 | region: "bra", |
||
168 | division: "FR", |
||
169 | dateTime: 1566496800000, |
||
170 | home: "V.O. Steenokkerzeel", |
||
171 | away: "KCVV Elewijt B", |
||
172 | resultHome: "4", |
||
173 | resultAway: "7", |
||
174 | status: "", |
||
175 | // matchDay, |
||
176 | regNumberHome: "02660", |
||
177 | regNumberAway: "00055", |
||
178 | } |
||
179 | return ( |
||
180 | <Layout> |
||
181 | <SEO |
||
182 | lang="nl-BE" |
||
183 | title="Matchoverzicht voorbereiding" |
||
184 | description="Overzicht van alle gespeelde en toekomstige wedstrijden tijdens de voorbereiding van het nieuwe seizoen." |
||
185 | path={this.props.location.pathname} |
||
186 | /> |
||
187 | <div className={"games__template"}> |
||
188 | <MatchWithLogo match={wedstrijd1} /> |
||
189 | <MatchWithLogo match={wedstrijd2} /> |
||
190 | <MatchWithLogo match={wedstrijd3} /> |
||
191 | <MatchWithLogo match={wedstrijd4} /> |
||
192 | <MatchWithLogo match={wedstrijd5} /> |
||
193 | <MatchWithLogo match={wedstrijd6} /> |
||
194 | <MatchWithLogo match={wedstrijd10} /> |
||
195 | <MatchWithLogo match={wedstrijd11} /> |
||
196 | <MatchWithLogo match={wedstrijd7} /> |
||
197 | <MatchWithLogo match={wedstrijd12} /> |
||
198 | <MatchWithLogo match={wedstrijd13} /> |
||
199 | <MatchWithLogo match={wedstrijd14} /> |
||
200 | <MatchWithLogo match={wedstrijd9} /> |
||
201 | </div> |
||
202 | </Layout> |
||
203 | ) |
||
208 |