mirror of https://github.com/sualko/cloud_bbb
parent
e0bc1a2332
commit
76bd1e16ab
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import { useState } from "react";
|
||||
import { Room } from "../Common/Api";
|
||||
import React from 'react';
|
||||
import { Room } from '../Common/Api';
|
||||
|
||||
type Props = {
|
||||
id: string
|
||||
|
@ -21,7 +20,7 @@ const SharedPresentationInput: React.FC<Props> = ({ room, updateRoom, id }) => {
|
|||
updateRoom({...room, presentationUserId: '', presentationPath: ''});
|
||||
}
|
||||
|
||||
function getAvatarUrl(userId) {
|
||||
function getAvatarUrl() {
|
||||
if (room.presentationUserId === null || room.presentationUserId === undefined) {
|
||||
return ;
|
||||
}
|
||||
|
@ -30,14 +29,14 @@ const SharedPresentationInput: React.FC<Props> = ({ room, updateRoom, id }) => {
|
|||
user: room.presentationUserId,
|
||||
size: 24,
|
||||
requesttoken: OC.requestToken,
|
||||
}))
|
||||
}));
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="bbb-presentation-input">
|
||||
<input id={id} type="button" value={t('bbb', 'Choose a File')} onClick={filepicker} />
|
||||
<p className={ room.presentationPath === '' ? 'hidden' : ''}>
|
||||
<img src={getAvatarUrl(room.presentationUserId)} alt={room.presentationUserId} className="bbb-avatar" height="100%" />
|
||||
<img src={getAvatarUrl()} alt={room.presentationUserId} className="bbb-avatar" height="100%" />
|
||||
<em>{room.presentationPath}</em>
|
||||
<button onClick={removeFile}><span className="icon icon-close icon-visible"></span></button>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue