diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /client/src/pages/ServerSelection.js | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'client/src/pages/ServerSelection.js')
| -rw-r--r-- | client/src/pages/ServerSelection.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/client/src/pages/ServerSelection.js b/client/src/pages/ServerSelection.js new file mode 100644 index 0000000..f1e3a39 --- /dev/null +++ b/client/src/pages/ServerSelection.js @@ -0,0 +1,33 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { MDBAlert, MDBRow } from 'mdbreact'; + +import ServerCard from '../components/selection/ServerCard'; + +export default class ServerSelection extends Component { + render() { + const guilds = this.props.user.guilds.filter(g => g.admin); + + if (!guilds.length) { + return( + <MDBAlert color="warning"> + <strong>You cannot manage any servers</strong> + </MDBAlert> + ); + } else { + return( + <React.Fragment> + <MDBRow> + {guilds.map(guild => { + return(<ServerCard guild={guild} />); + })} + </MDBRow> + </React.Fragment> + ); + } + } +} + +ServerSelection.propTypes = { + user: PropTypes.object +}
\ No newline at end of file |