mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
e832c9ed70
GitOrigin-RevId: dd9ab4bb12e8b9071b2a869e2d452945b49d9cd7
44 lines
1 KiB
JavaScript
44 lines
1 KiB
JavaScript
import React from 'react'
|
|
import PreviewLogsPane from '../js/features/preview/components/preview-logs-pane'
|
|
import { EditorProvider } from '../js/shared/context/editor-context'
|
|
import { ApplicationProvider } from '../js/shared/context/application-context'
|
|
import useFetchMock from './hooks/use-fetch-mock'
|
|
|
|
export const TimedOutError = args => {
|
|
useFetchMock(fetchMock => {
|
|
fetchMock.post('express:/event/:key', 202)
|
|
})
|
|
|
|
const ide = {
|
|
$scope: {
|
|
$watch: () => () => null,
|
|
project: {
|
|
owner: {
|
|
_id: window.user.id,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
return (
|
|
<ApplicationProvider>
|
|
<EditorProvider ide={ide} settings={{}}>
|
|
<PreviewLogsPane {...args} />
|
|
</EditorProvider>
|
|
</ApplicationProvider>
|
|
)
|
|
}
|
|
TimedOutError.args = {
|
|
errors: {
|
|
timedout: {},
|
|
},
|
|
}
|
|
|
|
export default {
|
|
title: 'Preview Logs / Pane',
|
|
component: PreviewLogsPane,
|
|
argTypes: {
|
|
onLogEntryLocationClick: { action: 'log entry location' },
|
|
onClearCache: { action: 'clear cache' },
|
|
},
|
|
}
|