overleaf/services/web/frontend/js/features/preview/components/preview-logs-pane.js
Simon Detheridge 315987dc5a Merge pull request #3175 from overleaf/pr-spike-new-logs-errors-ui
Spike new logs errors ui

GitOrigin-RevId: b4c598bc03d8aa8e5a438ac5633e18dadd82dc74
2020-09-29 02:05:19 +00:00

23 lines
513 B
JavaScript

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