import React from 'react'; import { Room } from '../Common/Api'; type Props = { id: string room: Room updateRoom: (Room) => Promise } const SharedPresentationInput: React.FC = ({ room, updateRoom, id }) => { function filepicker() { OC.dialogs.filepicker(t('bbb', 'Default Presentation'), file => { updateRoom({...room, presentationUserId: '', presentationPath: file}); }, ); } function removeFile() { updateRoom({...room, presentationUserId: '', presentationPath: ''}); } function getAvatarUrl() { if (room.presentationUserId === null || room.presentationUserId === undefined) { return ; } return (OC.generateUrl('/avatar/' + encodeURIComponent(room.presentationUserId) + '/' + 24, { user: room.presentationUserId, size: 24, requesttoken: OC.requestToken, })); } return(

{room.presentationUserId} {room.presentationPath}

); }; export default SharedPresentationInput;