Skip to content

Conversation

bolasevich
Copy link
Contributor

No description provided.

@temptemp3
Copy link
Contributor

Screenshot 2025-05-27 at 21 40 28

Couldn't you simply hide this menu item instead of the dropdown items

@temptemp3 temptemp3 requested a review from Copilot May 28, 2025 03:42
Copy link
Contributor

@Copilot Copilot AI left a 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 PR introduces a feature flag to conditionally show non-VOI payment options in the EnvoiLayout.

  • Adds allowNonVoiPayments state to control visibility of additional payment methods.
  • Wraps aUSDC and UNIT <MenuItem>s behind this flag.
Comments suppressed due to low confidence (1)

src/layouts/EnvoiLayout.tsx:1339

  • Add unit or integration tests to verify that the non-VOI payment options appear when allowNonVoiPayments is enabled.
{allowNonVoiPayments && (

);
const [refreshTrigger, setRefreshTrigger] = useState(0);
const [paymentModalOpen, setPaymentModalOpen] = useState(false);
const [allowNonVoiPayments, setAllowNonVoiPayments] = useState(false);
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

The allowNonVoiPayments state is initialized but never updated, so the conditional block will never render. Hook this flag up to props, context, or a feature-flag service.

Copilot uses AI. Check for mistakes.

);
const [refreshTrigger, setRefreshTrigger] = useState(0);
const [paymentModalOpen, setPaymentModalOpen] = useState(false);
const [allowNonVoiPayments, setAllowNonVoiPayments] = useState(false);
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

[nitpick] Using local component state for a feature flag can lead to inconsistent behavior across the app; consider sourcing this flag from a centralized config or context.

Copilot uses AI. Check for mistakes.

@temptemp3 temptemp3 changed the base branch from topic/envoi-beta to main September 27, 2025 16:16
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.

3 participants