mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 15:53:04 -05:00
9daa8f5d98
[web] rename all the JSX files to .jsx/.tsx GitOrigin-RevId: 82056ae47e017523722cf258dcc83c8a925a28f7
27 lines
817 B
JavaScript
27 lines
817 B
JavaScript
import Icon from '../../../shared/components/icon'
|
|
import { Button } from 'react-bootstrap'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { memo } from 'react'
|
|
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
|
|
|
|
function PdfClearCacheButton() {
|
|
const { compiling, clearCache, clearingCache } = useCompileContext()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<Button
|
|
bsSize="small"
|
|
bsStyle="danger"
|
|
className="logs-pane-actions-clear-cache"
|
|
onClick={() => clearCache()}
|
|
disabled={clearingCache || compiling}
|
|
>
|
|
{clearingCache ? <Icon type="refresh" spin /> : <Icon type="trash-o" />}
|
|
|
|
<span>{t('clear_cached_files')}</span>
|
|
</Button>
|
|
)
|
|
}
|
|
|
|
export default memo(PdfClearCacheButton)
|