refactor(component): adjust confirm modal api (#7589)

This commit is contained in:
EYHN
2024-07-24 08:18:33 +00:00
parent 6ca7c41861
commit 98281a6394
28 changed files with 51 additions and 54 deletions
@@ -84,13 +84,13 @@ export const useEnableCloud = () => {
title: t['Enable AFFiNE Cloud'](),
description: t['Enable AFFiNE Cloud Description'](),
cancelText: t['com.affine.enableAffineCloudModal.button.cancel'](),
confirmText:
loginStatus === 'authenticated'
? t['Enable']()
: t['Sign in and Enable'](),
confirmButtonOptions: {
type: 'primary',
['data-testid' as string]: 'confirm-enable-affine-cloud-button',
children:
loginStatus === 'authenticated'
? t['Enable']()
: t['Sign in and Enable'](),
},
onConfirm: async () =>
await signInOrEnableCloud(ws, {