]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/discord-guilds/Box.js
clean up manual tracking
[alttp.git] / resources / js / components / discord-guilds / Box.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3
4 const getIconUrl = guild =>
5         `https://cdn.discordapp.com/icons/${guild.guild_id}/${guild.icon_hash}.png`;
6
7 const Box = ({ guild }) => <div className="guild-box">
8                 <img alt="" src={getIconUrl(guild)} />
9                 <span>{guild.name}</span>
10         </div>;
11
12 Box.propTypes = {
13         guild: PropTypes.shape({
14                 guild_id: PropTypes.string,
15                 icon_hash: PropTypes.string,
16                 name: PropTypes.string,
17         }),
18 };
19
20 export default Box;