import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withRoomContext } from '../../../RoomContext'; import { withStyles } from '@material-ui/core/styles'; import magnet from 'magnet-uri'; import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import EmptyAvatar from '../../../images/avatar-empty.jpeg'; const styles = (theme) => ({ root : { display : 'flex', alignItems : 'center', width : '100%', padding : theme.spacing.unit, boxShadow : '0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)', '&:not(:last-child)' : { marginBottom : theme.spacing.unit } }, avatar : { borderRadius : '50%', height : '2rem' }, text : { margin : 0, padding : theme.spacing.unit }, fileContent : { display : 'flex', alignItems : 'center' }, fileInfo : { display : 'flex', alignItems : 'center', padding : theme.spacing.unit }, button : { marginRight : 'auto' } }); class File extends Component { render() { const { roomClient, torrentSupport, file, classes } = this.props; return (