mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
c6a853c7ed
New log entries ui GitOrigin-RevId: a13ccac04197e7c8f3777750b956d550c95c8f0d
28 lines
673 B
JavaScript
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
|