chat-fallback-error.jsx 771 B

1234567891011121314151617181920212223242526272829
  1. import PropTypes from 'prop-types'
  2. import { useTranslation } from 'react-i18next'
  3. import OLNotification from '@/features/ui/components/ol/ol-notification'
  4. import OLButton from '@/features/ui/components/ol/ol-button'
  5. function ChatFallbackError({ reconnect }) {
  6. const { t } = useTranslation()
  7. return (
  8. <aside className="chat">
  9. <div className="chat-error">
  10. <OLNotification type="error" content={t('chat_error')} />
  11. {reconnect && (
  12. <p className="text-center">
  13. <OLButton variant="secondary" onClick={reconnect}>
  14. {t('reconnect')}
  15. </OLButton>
  16. </p>
  17. )}
  18. </div>
  19. </aside>
  20. )
  21. }
  22. ChatFallbackError.propTypes = {
  23. reconnect: PropTypes.any,
  24. }
  25. export default ChatFallbackError