Skip to content

Conversation

@jimwei1
Copy link
Contributor

@jimwei1 jimwei1 commented Dec 27, 2025

Description

Refactor: Clean up BankTransactions.tsx conditional logic

Changes

  • Separate height/width conditional logic
  • Add ViewType type + clean up conditional logic

Note

Streamlines how bank transactions views are determined and rendered.

  • Adds ViewType enum and viewType useMemo to drive Table/List/MobileList/Loading rendering in BankTransactions.tsx
  • Simplifies container size handler: computes targetShift for sticky header and shouldBeListView from width; debounced updates
  • Replaces scattered conditionals with clean viewType-based JSX branches, including unified Loader handling
  • Minor import reorder for NewToggle in BankTransactionsHeader.tsx and mobile list item expanded row

Written by Cursor Bugbot for commit 7e03c52. This will update automatically on new commits. Configure here.

Context used:

  • Rule from dashboard - In Typescript files, use type declarations instead of interface declarations if the object is in... (source)

@augmentcode
Copy link

augmentcode bot commented Dec 27, 2025

🤖 Augment PR Summary

Summary: Refactors BankTransactions.tsx to simplify responsive rendering and reduce nested conditionals.

Changes:

  • Computes shiftStickyHeader via a single targetShift derived from container height.
  • Derives listView from container width using a single shouldBeListView flag.
  • Introduces a ViewType union and memoized viewType to centralize table/list/mobile/loading render branches.

Technical Notes: Keeps the same breakpoint and loading behavior while making the conditions easier to reason about.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@jimwei1 jimwei1 requested a review from sarahraines January 2, 2026 18:41
@jimwei1
Copy link
Contributor Author

jimwei1 commented Jan 13, 2026

This should actually now be using ResponsiveContainer. Closing and updating ticket.

@jimwei1 jimwei1 closed this Jan 13, 2026
@jimwei1 jimwei1 deleted the zjw-LAY-1999 branch January 13, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants