File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
server/client/src/components/surveys Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,32 @@ class SurveyList extends Component {
77 this . props . fetchSurveys ( ) ;
88 }
99
10+ renderSurveys ( ) {
11+ return this . props . surveys . map ( survey => {
12+ return (
13+ < div className = "card darken-1" key = { survey . _id } >
14+ < div className = "card-content" >
15+ < span className = "card-title" > { survey . title } </ span >
16+ < p >
17+ { survey . body }
18+ </ p >
19+ < p className = "right" >
20+ Sent On: { new Date ( survey . dateSent ) . toLocaleDateString ( ) }
21+ </ p >
22+ </ div >
23+ < div className = "card-action" >
24+ < a > Yes: { survey . yes } </ a >
25+ < a > No: { survey . no } </ a >
26+ </ div >
27+ </ div >
28+ ) ;
29+ } ) ;
30+ }
31+
1032 render ( ) {
1133 return (
1234 < div >
13- SurveyList
35+ { this . renderSurveys ( ) }
1436 </ div >
1537 ) ;
1638 }
You can’t perform that action at this time.
0 commit comments