import { useTranslation } from 'react-i18next' import { memo } from 'react' import { Button } from 'react-bootstrap' import classNames from 'classnames' import Icon from '../../../shared/components/icon' import { useDetachCompileContext } from '../../../shared/context/detach-compile-context' import Tooltip from '../../../shared/components/tooltip' const modifierKey = /Mac/i.test(navigator.platform) ? 'Cmd' : 'Ctrl' function DetachCompileButton() { const { t } = useTranslation() const { compiling, startCompile, hasChanges } = useDetachCompileContext() const compileButtonLabel = compiling ? `${t('compiling')}…` : t('recompile') const tooltipElement = ( <> {t('recompile_pdf')}{' '} ({modifierKey} + Enter) > ) return (