-
-
Notifications
You must be signed in to change notification settings - Fork 8
Footer language to match main site #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the tax-deductible statement language in the donate widget footer to match the main site's language and adds support for customizable tax deductible statements.
- Updates tax deductible statement language to be consistent with main site
- Adds support for DAF (Donor Advised Fund) specific messaging
- Introduces custom tax deductible statement functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Nonprofit.ts | Adds new metadata fields for custom tax deductible statements and grantee names |
| helpers.tsx | Updates tax deductible statement logic with DAF support and custom messaging capabilities |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| metadata?: { | ||
| customTaxDeductible?: boolean; | ||
| disablePrivateNotes?: boolean; | ||
| granteeName?: boolean; |
Copilot
AI
Sep 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The granteeName field should be typed as string rather than boolean since it's used to return a name value in the getGranteeName function.
| granteeName?: boolean; | |
| granteeName?: string; |
| if (nonprofit.metadata?.granteeName) { | ||
| return nonprofit.metadata?.granteeName; |
Copilot
AI
Sep 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code expects granteeName to be a string value to return, but the type definition shows it as a boolean. This will cause incorrect behavior when the field is true but no actual name is provided.
| if (nonprofit.metadata?.granteeName) { | |
| return nonprofit.metadata?.granteeName; | |
| // Only return granteeName if it is a non-empty string | |
| if (typeof nonprofit.metadata?.granteeName === 'string' && nonprofit.metadata?.granteeName.trim() !== '') { | |
| return nonprofit.metadata.granteeName; |
| noPermission = `Please note ${nonprofitNameWithVerb} not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`; | ||
| } | ||
|
|
||
| const customTaxDeductible = nonprofit.metadata?.customTaxDeductible || ""; |
Copilot
AI
Sep 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The customTaxDeductible field is typed as boolean but used as a string here. Consider changing the type to string or handle the boolean value appropriately.
| const customTaxDeductible = nonprofit.metadata?.customTaxDeductible || ""; | |
| let customTaxDeductible = ""; | |
| if (typeof nonprofit.metadata?.customTaxDeductible === "string") { | |
| customTaxDeductible = nonprofit.metadata.customTaxDeductible; | |
| } else if (typeof nonprofit.metadata?.customTaxDeductible === "boolean") { | |
| // If true, show a default message; if false, show nothing | |
| customTaxDeductible = nonprofit.metadata.customTaxDeductible | |
| ? "This donation is tax-deductible." | |
| : ""; | |
| } |
No description provided.