mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
refactor: change locale key (#3838)
This commit is contained in:
@@ -41,7 +41,9 @@ export const Confirm = ({
|
||||
}: ConfirmProps) => {
|
||||
const t = useAFFiNEI18N();
|
||||
const cancelText_ = useMemo<string>(() => {
|
||||
return cancelText === 'Cancel' ? t['Cancel']() : cancelText;
|
||||
return cancelText === 'Cancel'
|
||||
? t['com.affine.confirmModal.button.cancel']()
|
||||
: cancelText;
|
||||
}, [cancelText, t]);
|
||||
|
||||
const handleCancel = useCallback(() => {
|
||||
|
||||
@@ -60,7 +60,7 @@ export const ConfirmModal = ({
|
||||
<StyledModalContent>{content}</StyledModalContent>
|
||||
<StyledModalFooter>
|
||||
<Button onClick={onCancel} style={{ marginRight: 20 }}>
|
||||
{t['Cancel']()}
|
||||
{t['com.affine.confirmModal.button.cancel']()}
|
||||
</Button>
|
||||
<Button type={confirmType} onClick={onConfirm}>
|
||||
{confirmText || t['Confirm']()}
|
||||
|
||||
Reference in New Issue
Block a user