|
@@ -35,17 +35,16 @@ const styles = theme => ({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
-const cats = [
|
|
|
|
- 'Cool Cat',
|
|
|
|
- 'Bad Kitty',
|
|
|
|
- 'King of the Jungle',
|
|
|
|
- 'Incel cat',
|
|
|
|
- 'C-ch-at-d',
|
|
|
|
- 'Sabretooth Bro',
|
|
|
|
- 'Higher order being',
|
|
|
|
- 'Decadent feline',
|
|
|
|
- 'Trapped in the litter box',
|
|
|
|
- 'All claw and no meow'
|
|
|
|
|
|
+const superheroes = [
|
|
|
|
+ 'Sabre Claus',
|
|
|
|
+ 'Rudolph Mistletoe',
|
|
|
|
+ 'Mr. Frosty',
|
|
|
|
+ 'Scrooge',
|
|
|
|
+ 'John McClane',
|
|
|
|
+ 'Midnight Snacking Gremlin',
|
|
|
|
+ 'Grinch',
|
|
|
|
+ 'Tiny Tim',
|
|
|
|
+ 'Jesus'
|
|
]
|
|
]
|
|
|
|
|
|
const partyHosts = ['In-Young', 'Emmanuel']
|
|
const partyHosts = ['In-Young', 'Emmanuel']
|
|
@@ -54,7 +53,7 @@ const MakeAttendees = (attendees) => {
|
|
const items = []
|
|
const items = []
|
|
if (attendees) {
|
|
if (attendees) {
|
|
for (let i = 0; i < attendees.length; i++) {
|
|
for (let i = 0; i < attendees.length; i++) {
|
|
- items.push(<div style={{flex: 1}}key={i}>{i+1}. <div>Name: <span className='attendee-name'>{attendees[i].name}</span></div><div>Type: <span className='attendee-name'>{attendees[i].cat ? attendees[i].cat : 'Cat hater'}</span></div>{partyHosts.indexOf(attendees[i].name) < 0 && attendees[i].guest ? <div><span className='attendee-name'> ...with an extra guest!! ;)</span> </div> : '' }
|
|
|
|
|
|
+ items.push(<div style={{flex: 1}}key={i}>{i+1}. <div>Name: <span className='attendee-name'>{attendees[i].name}</span></div><div>Type: <span className='attendee-name'>{attendees[i].superhero ? attendees[i].superhero : 'The Villain of All Things Christmas'}</span></div>{partyHosts.indexOf(attendees[i].name) < 0 && attendees[i].guest ? <div><span className='attendee-name'> ...with an extra guest!! ;)</span> </div> : '' }
|
|
<br /><br /></div>)
|
|
<br /><br /></div>)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -68,7 +67,7 @@ class TextFields extends React.Component {
|
|
super(props)
|
|
super(props)
|
|
this.state = {
|
|
this.state = {
|
|
name: '',
|
|
name: '',
|
|
- cat: '',
|
|
|
|
|
|
+ superhero: '',
|
|
significantOther: false,
|
|
significantOther: false,
|
|
attendees: undefined
|
|
attendees: undefined
|
|
}
|
|
}
|
|
@@ -87,17 +86,17 @@ class TextFields extends React.Component {
|
|
};
|
|
};
|
|
|
|
|
|
handleFoodSelect = (event) => {
|
|
handleFoodSelect = (event) => {
|
|
- this.setState({cat: event.target.value})
|
|
|
|
|
|
+ this.setState({superhero: event.target.value})
|
|
}
|
|
}
|
|
|
|
|
|
handleSignificantOther = () => {
|
|
handleSignificantOther = () => {
|
|
this.setState({significantOther: !this.state.significantOther})
|
|
this.setState({significantOther: !this.state.significantOther})
|
|
}
|
|
}
|
|
|
|
|
|
- Cats = () => {
|
|
|
|
|
|
+ Superheroes = () => {
|
|
const items = []
|
|
const items = []
|
|
- for (let i = 0; i < cats.length; i++) {
|
|
|
|
- items.push(<MenuItem key={i} value={cats[i]}>{cats[i]}</MenuItem>)
|
|
|
|
|
|
+ for (let i = 0; i < superheroes.length; i++) {
|
|
|
|
+ items.push(<MenuItem key={i} value={superheroes[i]}>{superheroes[i]}</MenuItem>)
|
|
}
|
|
}
|
|
|
|
|
|
return items
|
|
return items
|
|
@@ -107,7 +106,7 @@ class TextFields extends React.Component {
|
|
if (this.state.name && this.state.name.length > 0) {
|
|
if (this.state.name && this.state.name.length > 0) {
|
|
const body = JSON.stringify({
|
|
const body = JSON.stringify({
|
|
name: this.state.name,
|
|
name: this.state.name,
|
|
- cat: this.state.cat,
|
|
|
|
|
|
+ superhero: this.state.superhero,
|
|
guest: this.state.significantOther,
|
|
guest: this.state.significantOther,
|
|
})
|
|
})
|
|
|
|
|
|
@@ -162,7 +161,7 @@ class TextFields extends React.Component {
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<FormControl className='food-select'>
|
|
<FormControl className='food-select'>
|
|
- <InputLabel htmlFor="food-helper">What sort of cat are you?</InputLabel>
|
|
|
|
|
|
+ <InputLabel htmlFor="food-helper">Your ultimate celebrative festivian of the season</InputLabel>
|
|
<Select
|
|
<Select
|
|
value={this.state.cat}
|
|
value={this.state.cat}
|
|
onChange={this.handleFoodSelect}
|
|
onChange={this.handleFoodSelect}
|
|
@@ -170,9 +169,9 @@ class TextFields extends React.Component {
|
|
<MenuItem value="">
|
|
<MenuItem value="">
|
|
<em>The hell you talking about</em>
|
|
<em>The hell you talking about</em>
|
|
</MenuItem>
|
|
</MenuItem>
|
|
- {this.Cats()}
|
|
|
|
|
|
+ {this.Superheroes()}
|
|
</Select>
|
|
</Select>
|
|
- <FormHelperText>Calling all cats and jive turkeys</FormHelperText>
|
|
|
|
|
|
+ <FormHelperText>Your courage is needed to maximize festivities</FormHelperText>
|
|
</FormControl>
|
|
</FormControl>
|
|
<div style={styles.fullWidth}>
|
|
<div style={styles.fullWidth}>
|
|
<br />
|
|
<br />
|
|
@@ -210,4 +209,4 @@ TextFields.propTypes = {
|
|
classes: PropTypes.object.isRequired,
|
|
classes: PropTypes.object.isRequired,
|
|
};
|
|
};
|
|
|
|
|
|
-export default withStyles(styles)(TextFields);
|
|
|
|
|
|
+export default withStyles(styles)(TextFields);
|