mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
44eca312ff
PDF Detach Misc Tests GitOrigin-RevId: 9615c8fdfd8964a9c63d7c91e4596d397a1d35dc
25 lines
581 B
JavaScript
25 lines
581 B
JavaScript
import { Button } from 'react-bootstrap'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { memo } from 'react'
|
|
import { buildUrlWithDetachRole } from '../../../shared/utils/url-helper'
|
|
|
|
const redirect = function () {
|
|
window.location = buildUrlWithDetachRole(null).toString()
|
|
}
|
|
|
|
function PdfOrphanRefreshButton() {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<Button
|
|
onClick={redirect}
|
|
className="btn-orphan"
|
|
bsStyle="primary"
|
|
bsSize="small"
|
|
>
|
|
{t('redirect_to_editor')}
|
|
</Button>
|
|
)
|
|
}
|
|
|
|
export default memo(PdfOrphanRefreshButton)
|