import React from 'react'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import { Recording } from '../Common/Api'; type Props = { recording: Recording; isAdmin : boolean; deleteRecording: (recording: Recording) => void; storeRecording: (recording: Recording) => void; publishRecording: (recording: Recording, publish: boolean) => void; } const RecordingRow: React.FC = ({recording, isAdmin, deleteRecording, storeRecording, publishRecording}) => { function checkPublished(recording: Recording, onChange: (value: boolean) => void) { return (
onChange(event.target.checked)} />
); } return ( {(new Date(recording.startTime)).toLocaleString()} {recording.length === 0 ? '< 1 min' : (recording.length + ' min')} {n('bbb', '%n participant', '%n participants', recording.participants)} {recording.type} {isAdmin && checkPublished(recording, (checked) => { publishRecording(recording, checked); })} {isAdmin && } ); }; export default RecordingRow;