overleaf/services/web/frontend/js/features/chat/components/chat-fallback-error.jsx
ilkin-overleaf 6c7ee8f778 Merge pull request #20715 from overleaf/ii-bs5-chat-pane
[web] BS5 chat pane

GitOrigin-RevId: 8587aca1372b4d2087863d492e702f04a31c23e2
2024-10-14 11:07:26 +00:00

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