Owner/mod Allocate modal wired to distribute + application id + refresh - #1096
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 325023217c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const parseAmount = useCallback((value: string): number => { | ||
| const parsed = Number.parseFloat(value); | ||
| return Number.isFinite(parsed) ? parsed : NaN; |
There was a problem hiding this comment.
Validate the complete allocation amount
When an owner enters a formatted amount such as 1,000—the same comma-separated format shown for the pool holding—Number.parseFloat returns 1, so validation succeeds and the request allocates 1 RSC while the user intended 1,000. Trailing invalid text is similarly ignored; normalize supported separators and reject any input that is not entirely a valid decimal before enabling submission.
Useful? React with 👍 / 👎.
| grantAllocate?.setFundingPool(updatedPool); | ||
| void refreshProposals(); |
There was a problem hiding this comment.
Preserve proposals when the post-allocation refresh fails
If the follow-up funding_feed request fails after a successful allocation, fetchProposals has already cleared entries and its catch block only logs the error, so this fire-and-forget refresh leaves the proposals tab empty until another fetch or a reload. Preserve the existing entries during this refresh, or restore them when the request fails.
Useful? React with 👍 / 👎.
…HeaderGrant components; remove unused grantAmountUsd prop and adjust related calculations for funding pool mode.
…archHub/web into rfp-funding-pool-allocate
…amount validation; remove deprecated parseAmount function. Clean up GrantPageContent by removing unused comments.
…andling; update AllocateFundingPoolModal and ContributeToFundraiseModal for improved amount display and validation. Enhance WorkHeaderGrant and ProposalWorkCard to support RFP funding pool logic.
…te ActivityCardCompact to conditionally hide title links based on the current document ID. Modify ActivitySidebar and ActivitySidebarServer to pass currentDocumentId prop for improved user experience in activity tracking.
…ub/web into rfp-funding-pool-allocate
…onsistency. Update verb usage in activity messages for clarity.
|



No description provided.