Getting Started
- Fork the repository: https://github.com/JointSave-org/Joint_Save
- Clone your fork:
git clone https://github.com/<your-username>/Joint_Save.git
cd Joint_Save
- Create a new branch:
git checkout -b feat/global-toast-system
Overview
The project has a toast.tsx, toaster.tsx, and use-toast.ts already scaffolded under components/ui/, but several components (group-actions.tsx, the create-group forms) currently render error and success messages as inline <div> blocks with manually managed local state, rather than using the existing toast system. This is inconsistent and means errors can be missed if they scroll out of view.
Requirements
Audit and Migration
- Audit
group-actions.tsx, flexible-form.tsx, rotational-form.tsx, target-form.tsx, and create-group.tsx for inline success/error message rendering
- Replace all of them with calls to the existing
useToast() hook from hooks/use-toast.ts
- Standardize toast variants:
success, error, info, warning — verify toast.tsx supports distinct visual styling for each (add if missing)
Consistency Rules
- All blockchain transaction outcomes (success/failure) must use toasts, never inline divs
- Form validation errors (e.g., "amount must be greater than 0") can remain inline next to the relevant field, but submission-level errors (network failure, contract rejection) must use toasts
- Toasts for transaction confirmations should include a "View on Explorer" action button linking to the Stellar Expert transaction page
Acceptance Criteria
Getting Started
Overview
The project has a
toast.tsx,toaster.tsx, anduse-toast.tsalready scaffolded undercomponents/ui/, but several components (group-actions.tsx, the create-group forms) currently render error and success messages as inline<div>blocks with manually managed local state, rather than using the existing toast system. This is inconsistent and means errors can be missed if they scroll out of view.Requirements
Audit and Migration
group-actions.tsx,flexible-form.tsx,rotational-form.tsx,target-form.tsx, andcreate-group.tsxfor inline success/error message renderinguseToast()hook fromhooks/use-toast.tssuccess,error,info,warning— verifytoast.tsxsupports distinct visual styling for each (add if missing)Consistency Rules
Acceptance Criteria
<div>blocks for transaction outcomes in the audited components