Add accounts: link a bank without Plaid keys points to Setup; delete test data right there
- With no Plaid keys, the page said bank linking "isn't available in United States yet". It is: the keys are missing. It now shows Link a bank or card, which opens Setup to add the free Plaid keys. - Test banks: the Delete test data link went to Settings. It's now a button on this page, with a confirm, that removes the test bank and its transactions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e51cc4fcc
commit
fb8e5425c3
5 files changed
+10
-5
No files matched your search
@@ -211,6 +211,7 @@ export function AddAccounts({ choices, accounts, locale, currency, country }: {
|
||||
{choices.feeds.map((f) => <FeedConnect key={f} id={f} country={country} />)}
|
||||
<div className="grid grid-cols-1 @xl:grid-cols-2 gap-4">
|
||||
{choices.bank === "plaid" && <PlaidCard link={link} />}
|
||||
{choices.plaidMissing && <Card icons={[BankIcon, CreditCardIcon, WalletIcon]} title="Link a bank or card" body="Add your free Plaid keys in Setup first. It takes about 2 minutes." onClick={() => window.location.assign("/setup")} />}
|
||||
{(choices.bank === "akahu" || choices.alsoAkahu) && <AkahuCard />}
|
||||
{choices.investments && <InvestCard link={link} />}
|
||||
<ImportStatement accounts={accounts} locale={locale} currency={currency} trigger={(open) => (
|
||||
|
||||
@@ -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 <span className="text-sm text-good inline-flex items-center gap-1"><Check size={13} /> Test connections removed.</span>;
|
||||
if (!left.length) return <span className="text-sm text-good inline-flex items-center gap-1"><Check size={13} /> Test data deleted.</span>;
|
||||
async function remove() {
|
||||
setBusy(true);
|
||||
setErr("");
|
||||
@@ -37,7 +37,7 @@ export function RemoveTest({ items, intro }: { items: { id: string; name: string
|
||||
<button className="text-muted hover:text-ink" disabled={busy} onClick={() => setConfirm(false)}>Cancel</button>
|
||||
</div>
|
||||
) : (
|
||||
<button className="btn" onClick={() => setConfirm(true)}>Remove test connections</button>
|
||||
<button className="btn" onClick={() => setConfirm(true)}>Delete test data</button>
|
||||
)}
|
||||
{err && <p className="text-bad">{err}</p>}
|
||||
</div>
|
||||
|
||||
@@ -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?:
|
||||
)}
|
||||
</ul>
|
||||
{conns.some((c) => c.test) && (
|
||||
<p className="px-5 py-3.5 border-t border-line text-sm">Test banks count in your totals. <Link href="/settings#banks" className="underline underline-offset-2">Delete test data</Link></p>
|
||||
<div className="px-5 py-3.5 border-t border-line">
|
||||
<RemoveTest items={conns.filter((c) => c.test).map((c) => ({ id: c.id, name: c.name }))} intro="Test banks count in your totals." />
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user