overleaf/services/web/frontend/js/features/preview/components/preview-logs-pane.js
Jakob Ackermann c6a853c7ed Merge pull request #3332 from overleaf/pr-new-log-entries-ui
New log entries ui

GitOrigin-RevId: a13ccac04197e7c8f3777750b956d550c95c8f0d
2020-11-06 03:04:59 +00:00

28 lines
673 B
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import PreviewLogEntry from './preview-log-entry'
function PreviewLogsPane({ logEntries, onLogEntryLinkClick }) {
return (
<div className="logs-pane">
{logEntries && logEntries.length > 0 ? (
logEntries.map((logEntry, idx) => (
<PreviewLogEntry
key={idx}
{...logEntry}
onLogEntryLinkClick={onLogEntryLinkClick}
/>
))
) : (
<div>No logs</div>
)}
</div>
)
}
PreviewLogsPane.propTypes = {
logEntries: PropTypes.array,
onLogEntryLinkClick: PropTypes.func.isRequired
}
export default PreviewLogsPane