pdf-orphan-refresh-button.js 581 B

12345678910111213141516171819202122232425
  1. import { Button } from 'react-bootstrap'
  2. import { useTranslation } from 'react-i18next'
  3. import { memo } from 'react'
  4. import { buildUrlWithDetachRole } from '../../../shared/utils/url-helper'
  5. const redirect = function () {
  6. window.location = buildUrlWithDetachRole(null).toString()
  7. }
  8. function PdfOrphanRefreshButton() {
  9. const { t } = useTranslation()
  10. return (
  11. <Button
  12. onClick={redirect}
  13. className="btn-orphan"
  14. bsStyle="primary"
  15. bsSize="small"
  16. >
  17. {t('redirect_to_editor')}
  18. </Button>
  19. )
  20. }
  21. export default memo(PdfOrphanRefreshButton)