import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withRoomContext } from '../../../RoomContext'; import magnet from 'magnet-uri'; const DEFAULT_PICTURE = 'resources/images/avatar-empty.jpeg'; class File extends Component { render() { const { roomClient, torrentSupport, file } = this.props; return (
You shared a file.
{file.displayName} shared a file.
Your browser does not support downloading files using WebTorrent.
{magnet.decode(file.magnetUri).dn}
If this process takes a long time, there might not be anyone seeding this torrent. Try asking someone to reupload the file that you want.
File finished downloading.
{file.files.map((sharedFile, i) => ({sharedFile.name}