Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix direct index access of strings

Abdullah Attac19635b16afe
diff --git a/apps/web/src/dialogs/add-reminder-dialog.tsx b/apps/web/src/dialogs/add-reminder-dialog.tsx
index c1c9333d5..448185529 100644
--- a/apps/web/src/dialogs/add-reminder-dialog.tsx
+++ b/apps/web/src/dialogs/add-reminder-dialog.tsx
@@ -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>
diff --git a/apps/web/src/dialogs/settings/components/billing-history.tsx b/apps/web/src/dialogs/settings/components/billing-history.tsx
index 217b75598..0e6b93cc8 100644
--- a/apps/web/src/dialogs/settings/components/billing-history.tsx
+++ b/apps/web/src/dialogs/settings/components/billing-history.tsx
@@ -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
diff --git a/apps/web/src/views/recovery.tsx b/apps/web/src/views/recovery.tsx
index 5dd03f7c0..08ec112f8 100644
--- a/apps/web/src/views/recovery.tsx
+++ b/apps/web/src/views/recovery.tsx
@@ -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");