mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 19:13:38 -05:00
1e1a8c0bb3
GitOrigin-RevId: 981de624f3964ebe3ff1f0c751fcef9158864d5e
33 lines
827 B
TypeScript
33 lines
827 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react'
|
|
import { LoadingError } from '@/features/ide-react/components/loading-error'
|
|
|
|
const meta: Meta<typeof LoadingError> = {
|
|
title: 'Loading Page / Loading Error',
|
|
component: LoadingError,
|
|
}
|
|
|
|
export default meta
|
|
|
|
type Story = StoryObj<typeof LoadingError>
|
|
|
|
export const IoNotLoaded: Story = {
|
|
render: () => {
|
|
window.metaAttributesCache.set(
|
|
'ol-translationIoNotLoaded',
|
|
'Could not connect to the WebSocket server'
|
|
)
|
|
|
|
return <LoadingError connectionStateError="io-not-loaded" />
|
|
},
|
|
}
|
|
|
|
export const UnableToJoin: Story = {
|
|
render: () => {
|
|
window.metaAttributesCache.set(
|
|
'ol-translationUnableToJoin',
|
|
'Could not connect to the collaboration server'
|
|
)
|
|
|
|
return <LoadingError connectionStateError="unable-to-join" />
|
|
},
|
|
}
|