Skip to content

fix: add Suspense boundaries for useSearchParams in add-money/withdraw pages #1846

Description

@chip-peanut-bot

Problem

AddWithdrawRouterView.tsx uses useSearchParams() (line 75) but the parent pages (/add-money/page.tsx, /withdraw/page.tsx) have no <Suspense> boundary.

In Next.js App Router, useSearchParams() without Suspense can cause the entire page to block rendering during client-side navigation. On low-end devices (Moto G31/G23), this manifests as a full UI freeze.

/home/page.tsx correctly wraps things in <Suspense> but add-money and withdraw don't.

Fix

Wrap <AddWithdrawRouterView /> in <Suspense fallback={<PeanutLoading />}> in:

  • src/app/(mobile-ui)/add-money/page.tsx
  • src/app/(mobile-ui)/withdraw/page.tsx

Context

User report: app freezes on add-money/withdraw screen, back button and home unresponsive. Reproducible on Motorola G31 (Android 12) and G23 (Android 14).
Crisp: https://app.crisp.chat/website/916078be-a6af-4696-82cb-bc08d43d9125/inbox/session_d5bc5de8-381c-49ef-a9ea-5bf89d979825/
Investigation: https://discord.com/channels/972435984954302464/1486336087747199059/1486337803708141588

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions