1 import PropTypes from 'prop-types';
2 import React from 'react';
4 const getIconUrl = guild =>
5 `https://cdn.discordapp.com/icons/${guild.guild_id}/${guild.icon_hash}.png`;
7 const Box = ({ guild }) => <div className="guild-box">
8 <img alt="" src={getIconUrl(guild)} />
9 <span>{guild.name}</span>
13 guild: PropTypes.shape({
14 guild_id: PropTypes.string,
15 icon_hash: PropTypes.string,
16 name: PropTypes.string,