diff options
| author | madelinegr <mgriswold99@gmail.com> | 2019-06-06 16:45:32 -0400 |
|---|---|---|
| committer | madelinegr <mgriswold99@gmail.com> | 2019-06-06 16:45:32 -0400 |
| commit | 51c59893afd84eb9f36669282cbf0479ee9d9f84 (patch) | |
| tree | c1215e449b3442a000c80541824cd24b8a80bc7a /src/client/views/presentationview/PresentationView.tsx | |
| parent | a794da35a96ba278e20a76591de86cac6ce44969 (diff) | |
Cleaned the ex implementation
Diffstat (limited to 'src/client/views/presentationview/PresentationView.tsx')
| -rw-r--r-- | src/client/views/presentationview/PresentationView.tsx | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx index 79b7c1f15..3263ea62e 100644 --- a/src/client/views/presentationview/PresentationView.tsx +++ b/src/client/views/presentationview/PresentationView.tsx @@ -19,7 +19,6 @@ export interface PresViewProps { interface PresListProps extends PresViewProps { deleteDocument(index: number): void; gotoDocument(index: number): void; - groupedMembers: Doc[][]; groupMappings: Map<String, Doc[]>; } @@ -50,17 +49,6 @@ class PresentationViewList extends React.Component<PresListProps> { // } // } // } - @action - initializeGroupArrays = (docList: Doc[]) => { - console.log("Starting len: ", this.props.groupedMembers.length); - docList.forEach((doc: Doc, index: number) => { - if (this.props.groupedMembers.length < index + 2) { - this.props.groupedMembers[index] = []; - this.props.groupedMembers[index].push(docList[index]); - - } - }); - } @action initializeGroupIds = (docList: Doc[]) => { @@ -118,12 +106,11 @@ class PresentationViewList extends React.Component<PresListProps> { render() { const children = DocListCast(this.props.Document.data); - this.initializeGroupArrays(children); this.initializeGroupIds(children); return ( <div className="presentationView-listCont"> - {children.map((doc: Doc, index: number) => <PresentationElement key={index} mainDocument={this.props.Document} document={doc} index={index} deleteDocument={this.props.deleteDocument} gotoDocument={this.props.gotoDocument} groupedMembers={this.props.groupedMembers} groupMappings={this.props.groupMappings} allListElements={children} />)} + {children.map((doc: Doc, index: number) => <PresentationElement key={index} mainDocument={this.props.Document} document={doc} index={index} deleteDocument={this.props.deleteDocument} gotoDocument={this.props.gotoDocument} groupMappings={this.props.groupMappings} allListElements={children} />)} </div> ); } @@ -210,7 +197,7 @@ export class PresentationView extends React.Component<PresViewProps> { <button className="presentation-button" onClick={this.back}>back</button> <button className="presentation-button" onClick={this.next}>next</button> </div> - <PresentationViewList Document={this.props.Document} deleteDocument={this.RemoveDoc} gotoDocument={this.gotoDocument} groupedMembers={this.groupedMembers} groupMappings={this.groupMappings} /> + <PresentationViewList Document={this.props.Document} deleteDocument={this.RemoveDoc} gotoDocument={this.gotoDocument} groupMappings={this.groupMappings} /> </div> ); } |
