From 6f71d328995c3a59ec0d0f96f0dc02c2436da4df Mon Sep 17 00:00:00 2001 From: anniegw2 Date: Sun, 7 Jul 2019 17:02:06 -0500 Subject: [PATCH] Ref #284 Detailed overview of single event --- .../src/components/interviewSectionModular.js | 8 +- frontend/src/pages/dashboard.js | 4 +- frontend/src/pages/eventdetails.js | 109 +++++++++++++ frontend/src/pages/interviewlist.js | 146 +++++++++--------- 4 files changed, 189 insertions(+), 78 deletions(-) create mode 100644 frontend/src/pages/eventdetails.js diff --git a/frontend/src/components/interviewSectionModular.js b/frontend/src/components/interviewSectionModular.js index cd0afb97..3523e522 100644 --- a/frontend/src/components/interviewSectionModular.js +++ b/frontend/src/components/interviewSectionModular.js @@ -15,9 +15,7 @@ class InterviewSectionModular extends Component { name="Time Commitment" id="time-commitment-input" > - {options.map(option => ( - - ))} + {options.map(option => )} ) } @@ -96,8 +94,8 @@ class InterviewSectionModular extends Component { {this.props.type == 'notes' ? null : this.props.type == 'dropdown' - ? this.mapOptionsDropdown(options) - : this.mapOptionsMultipleChoice(options)} + ? this.mapOptionsDropdown(options) + : this.mapOptionsMultipleChoice(options)} {this.props.type != 'notes' && this.props.notesPrompt ? ( <>
diff --git a/frontend/src/pages/dashboard.js b/frontend/src/pages/dashboard.js index 5f2e261b..4513a9b3 100644 --- a/frontend/src/pages/dashboard.js +++ b/frontend/src/pages/dashboard.js @@ -46,8 +46,8 @@ var sortByMultipleProperties = function(property1, property2) { return x[property1][property2] === y[property1][property2] ? 0 : x[property1][property2] > y[property1][property2] - ? 1 - : -1 + ? 1 + : -1 } } diff --git a/frontend/src/pages/eventdetails.js b/frontend/src/pages/eventdetails.js new file mode 100644 index 00000000..4ab2e05f --- /dev/null +++ b/frontend/src/pages/eventdetails.js @@ -0,0 +1,109 @@ +import React from 'react' +import { Table, Row, Button, Col, FormGroup, Label, Input, Container } from 'reactstrap' +import ActionButton from '../components/actionButton' +import Nav from '../components/nav' + +class Events extends React.Component { + constructor(props) { + super(props) + this.state = { + events: [] + } + } + + async componentDidMount() { + // const events = await getEvents() // api call + // if (events !== undefined) { + // this.setState({ + // events + // }); + // } + // } + this.setState({ + events: [ + { + name: "Alice's Event", + date: 'July 1', + startTime: 5, + endTime: 7, + location: 'Brew Lab', + attendees: 30, + fbLink: 'https://www.brewlab.coffee/' + } + ] + }) + } + + render() { + return ( + <> +