mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
web: fix direct index access of strings
This commit is contained in:
@@ -480,9 +480,7 @@ export const AddReminderDialog = DialogManager.register(
|
||||
checked={p.id === priority}
|
||||
onChange={() => setPriority(p.id)}
|
||||
/>
|
||||
{strings.reminderNotificationModes[
|
||||
p.title as keyof typeof strings.reminderNotificationModes
|
||||
]()}
|
||||
{strings.reminderNotificationModes(p.title)}
|
||||
</Label>
|
||||
))}
|
||||
</Flex>
|
||||
|
||||
@@ -130,7 +130,7 @@ export function BillingHistory() {
|
||||
{transaction.amount} {transaction.currency}
|
||||
</Text>
|
||||
<Text as="td" variant="body">
|
||||
{strings.transactionStatusToText[transaction.status]()}
|
||||
{strings.transactionStatusToText(transaction.status)}
|
||||
</Text>
|
||||
<Text as="td" variant="body">
|
||||
<Link
|
||||
|
||||
@@ -232,10 +232,31 @@ type RecoveryMethod = {
|
||||
isDangerous?: boolean;
|
||||
};
|
||||
|
||||
const recoveryMethods: RecoveryMethod[] = [
|
||||
{
|
||||
type: "key",
|
||||
testId: "step-recovery-key",
|
||||
title: () => strings.recoveryKeyMethod(),
|
||||
description: () => strings.recoveryKeyMethodDesc()
|
||||
},
|
||||
{
|
||||
type: "backup",
|
||||
testId: "step-backup",
|
||||
title: () => strings.backupFileMethod(),
|
||||
description: () => strings.backupFileMethodDesc()
|
||||
},
|
||||
{
|
||||
type: "reset",
|
||||
testId: "step-reset-account",
|
||||
title: () => strings.clearDataAndResetMethod(),
|
||||
description: () => strings.clearDataAndResetMethodDesc(),
|
||||
isDangerous: true
|
||||
}
|
||||
];
|
||||
|
||||
function RecoveryMethods(props: BaseRecoveryComponentProps<"methods">) {
|
||||
const { navigate } = props;
|
||||
const [selected, setSelected] = useState(0);
|
||||
const recoveryMethods = strings.accountRecoveryMethods as RecoveryMethod[];
|
||||
|
||||
if (isSessionExpired()) {
|
||||
navigate("new");
|
||||
|
||||
Reference in New Issue
Block a user