mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 23:36:00 -05:00
6c7ee8f778
[web] BS5 chat pane GitOrigin-RevId: 8587aca1372b4d2087863d492e702f04a31c23e2
29 lines
771 B
JavaScript
29 lines
771 B
JavaScript
import PropTypes from 'prop-types'
|
|
import { useTranslation } from 'react-i18next'
|
|
import OLNotification from '@/features/ui/components/ol/ol-notification'
|
|
import OLButton from '@/features/ui/components/ol/ol-button'
|
|
|
|
function ChatFallbackError({ reconnect }) {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<aside className="chat">
|
|
<div className="chat-error">
|
|
<OLNotification type="error" content={t('chat_error')} />
|
|
{reconnect && (
|
|
<p className="text-center">
|
|
<OLButton variant="secondary" onClick={reconnect}>
|
|
{t('reconnect')}
|
|
</OLButton>
|
|
</p>
|
|
)}
|
|
</div>
|
|
</aside>
|
|
)
|
|
}
|
|
|
|
ChatFallbackError.propTypes = {
|
|
reconnect: PropTypes.any,
|
|
}
|
|
|
|
export default ChatFallbackError
|