refactor: Simplify translation history clear button configuration

This commit is contained in:
kangfenmao 2025-02-21 11:17:41 +08:00
parent 6a57973864
commit 241cb0c0d8

View File

@ -190,13 +190,11 @@ const TranslatePage: FC = () => {
<HistoryContainner $historyDrawerVisible={historyDrawerVisible}>
<OperationBar>
<span style={{ fontSize: 16 }}>{t('translate.history.title')}</span>
{translateHistory?.length && (
{!isEmpty(translateHistory) && (
<Popconfirm
title={t('translate.history.clear')}
description={t('translate.history.clear_description')}
onConfirm={clearHistory}
okText="Yes"
cancelText="No">
onConfirm={clearHistory}>
<Button type="text" size="small" danger icon={<DeleteOutlined />}>
{t('translate.history.clear')}
</Button>