refactor: Simplify translation history clear button configuration
This commit is contained in:
parent
6a57973864
commit
241cb0c0d8
@ -190,13 +190,11 @@ const TranslatePage: FC = () => {
|
|||||||
<HistoryContainner $historyDrawerVisible={historyDrawerVisible}>
|
<HistoryContainner $historyDrawerVisible={historyDrawerVisible}>
|
||||||
<OperationBar>
|
<OperationBar>
|
||||||
<span style={{ fontSize: 16 }}>{t('translate.history.title')}</span>
|
<span style={{ fontSize: 16 }}>{t('translate.history.title')}</span>
|
||||||
{translateHistory?.length && (
|
{!isEmpty(translateHistory) && (
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title={t('translate.history.clear')}
|
title={t('translate.history.clear')}
|
||||||
description={t('translate.history.clear_description')}
|
description={t('translate.history.clear_description')}
|
||||||
onConfirm={clearHistory}
|
onConfirm={clearHistory}>
|
||||||
okText="Yes"
|
|
||||||
cancelText="No">
|
|
||||||
<Button type="text" size="small" danger icon={<DeleteOutlined />}>
|
<Button type="text" size="small" danger icon={<DeleteOutlined />}>
|
||||||
{t('translate.history.clear')}
|
{t('translate.history.clear')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user