diff --git a/src/app/(app)/accounts/add/page.tsx b/src/app/(app)/accounts/add/page.tsx index dce4ea4..d5644d8 100644 --- a/src/app/(app)/accounts/add/page.tsx +++ b/src/app/(app)/accounts/add/page.tsx @@ -20,7 +20,7 @@ export default async function AddAccountsPage({ searchParams }: { searchParams: {connect === "done" &&

Your bank is connected. Its transactions are on the way.

} {connect === "cancelled" &&

The connection was cancelled. Nothing changed.

} {connect === "failed" &&

That bank didn't connect. Try again, or import a statement instead.

} - {!choices.bank && !choices.feeds.length && !choices.akahuMissing && !choices.alsoAkahu &&

Automatic bank linking isn't available in {country.name} yet. Import a statement from your bank instead: it takes a minute and works with any bank.

} + {!choices.bank && !choices.plaidMissing && !choices.feeds.length && !choices.akahuMissing && !choices.alsoAkahu &&

Automatic bank linking isn't available in {country.name} yet. Import a statement from your bank instead: it takes a minute and works with any bank.

} {choices.akahuMissing && (

To sync NZ banks automatically, add Akahu keys on the Setup page. Until then, import a statement from your bank.

diff --git a/src/components/AddAccounts.tsx b/src/components/AddAccounts.tsx index eced3c6..c30999f 100644 --- a/src/components/AddAccounts.tsx +++ b/src/components/AddAccounts.tsx @@ -211,6 +211,7 @@ export function AddAccounts({ choices, accounts, locale, currency, country }: { {choices.feeds.map((f) => )}
{choices.bank === "plaid" && } + {choices.plaidMissing && window.location.assign("/setup")} />} {(choices.bank === "akahu" || choices.alsoAkahu) && } {choices.investments && } ( diff --git a/src/components/ClearTestData.tsx b/src/components/ClearTestData.tsx index 8d673c2..badd024 100644 --- a/src/components/ClearTestData.tsx +++ b/src/components/ClearTestData.tsx @@ -11,7 +11,7 @@ export function RemoveTest({ items, intro }: { items: { id: string; name: string const [busy, setBusy] = useState(false); const [left, setLeft] = useState(items); const [err, setErr] = useState(""); - if (!left.length) return Test connections removed.; + if (!left.length) return Test data deleted.; async function remove() { setBusy(true); setErr(""); @@ -37,7 +37,7 @@ export function RemoveTest({ items, intro }: { items: { id: string; name: string
) : ( - + )} {err &&

{err}

} diff --git a/src/components/LinkedNow.tsx b/src/components/LinkedNow.tsx index e984183..42f61dc 100644 --- a/src/components/LinkedNow.tsx +++ b/src/components/LinkedNow.tsx @@ -1,6 +1,6 @@ -import Link from "next/link"; import { Merchant } from "@/components/Merchant"; import { RemoveCopy } from "@/components/PlaidButtons"; +import { RemoveTest } from "@/components/ClearTestData"; import { duplicateItems } from "@/lib/links"; import { fmtFor, fmtWith } from "@/lib/format"; import { historyPending } from "@/lib/sync"; @@ -76,7 +76,9 @@ export async function LinkedNow({ userId, profile }: { userId: string; profile?: )} {conns.some((c) => c.test) && ( -

Test banks count in your totals. Delete test data

+
+ c.test).map((c) => ({ id: c.id, name: c.name }))} intro="Test banks count in your totals." /> +
)} ); diff --git a/src/lib/providers/index.ts b/src/lib/providers/index.ts index 75eb360..3d2f7a1 100644 --- a/src/lib/providers/index.ts +++ b/src/lib/providers/index.ts @@ -38,6 +38,8 @@ export function addChoices(country?: string | null, alsoNz = false) { sandbox: plaid && process.env.PLAID_ENV === "sandbox", // No Plaid keys at all: a made-up bank instead (api/demo-bank), so broke can be tried with only a database. demo: !configured("plaid"), + // The country has Plaid banks but this copy has no Plaid keys yet: offer the bank card anyway, pointing at Setup. + plaidMissing: countryOf(code).providers.includes("plaid") && !configured("plaid"), // NZ without Akahu keys: say where to add them. akahuMissing: (countryOf(code).providers.includes("akahu") || alsoNz) && !configured("akahu"), // Lives elsewhere but also banks in NZ (Settings, money profile): the NZ option beside their own.