import React from 'react'; import axios from 'axios'; export default class ServerPage extends React.Component { constructor() { super(); this.state = { error: false, server: {}, }; } async componentWillMount() { try { let server = await axios.get(`/serverlisting/server/${guildId}`); this.setState({ server: server.data, }); } catch (e) { this.setState({ error: 'Failed to load server, try again later' }); } } render() { if (this.state.error) { return (