mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +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}
|
checked={p.id === priority}
|
||||||
onChange={() => setPriority(p.id)}
|
onChange={() => setPriority(p.id)}
|
||||||
/>
|
/>
|
||||||
{strings.reminderNotificationModes[
|
{strings.reminderNotificationModes(p.title)}
|
||||||
p.title as keyof typeof strings.reminderNotificationModes
|
|
||||||
]()}
|
|
||||||
</Label>
|
</Label>
|
||||||
))}
|
))}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export function BillingHistory() {
|
|||||||
{transaction.amount} {transaction.currency}
|
{transaction.amount} {transaction.currency}
|
||||||
</Text>
|
</Text>
|
||||||
<Text as="td" variant="body">
|
<Text as="td" variant="body">
|
||||||
{strings.transactionStatusToText[transaction.status]()}
|
{strings.transactionStatusToText(transaction.status)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text as="td" variant="body">
|
<Text as="td" variant="body">
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -232,10 +232,31 @@ type RecoveryMethod = {
|
|||||||
isDangerous?: boolean;
|
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">) {
|
function RecoveryMethods(props: BaseRecoveryComponentProps<"methods">) {
|
||||||
const { navigate } = props;
|
const { navigate } = props;
|
||||||
const [selected, setSelected] = useState(0);
|
const [selected, setSelected] = useState(0);
|
||||||
const recoveryMethods = strings.accountRecoveryMethods as RecoveryMethod[];
|
|
||||||
|
|
||||||
if (isSessionExpired()) {
|
if (isSessionExpired()) {
|
||||||
navigate("new");
|
navigate("new");
|
||||||
|
|||||||
Reference in New Issue
Block a user