Skip to content

Make hero visibility control an actual toggle#103

Merged
DealPatrol merged 2 commits into
mainfrom
copilot/fix-code-review-suggestion
Jul 3, 2026
Merged

Make hero visibility control an actual toggle#103
DealPatrol merged 2 commits into
mainfrom
copilot/fix-code-review-suggestion

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The homepage hero described a Public toggle, but the UI rendered a non-interactive badge. This updates the control to behave like a real toggle and carries its value through the existing hero submission flow.

  • What changed

    • Replaced the static Public badge in HeroChat with an interactive toggle button.
    • Added local visibility state (public / private) to the hero prompt flow.
    • Included the selected visibility in the generated redirect URLs for sign-in, dashboard, and pricing.
  • Behavior

    • The control now switches between Public and Private.
    • The selected value is preserved in the query string used by the existing submission/redirect logic.
  • Implementation detail

    const [isPublic, setIsPublic] = useState(true)
    
    const ideaQuery = `idea=${ideaParam(idea)}&public=${String(isPublic)}`
    const returnTo = `/dashboard?${ideaQuery}`
    
    <button
      type="button"
      onClick={() => setIsPublic((current) => !current)}
      aria-pressed={isPublic}
    >
      {isPublic ? 'Public' : 'Private'}
    </button>

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
repo-app-architect Ready Ready Preview, Comment Jun 22, 2026 1:41am
repofuse Ready Ready Preview, Comment, Open in v0 Jun 22, 2026 1:41am
v0-repo-app-architect Ready Ready Preview, Comment, Open in v0 Jun 22, 2026 1:41am

@DealPatrol DealPatrol marked this pull request as ready for review July 3, 2026 03:29
@DealPatrol DealPatrol merged commit 3ec319d into main Jul 3, 2026
9 checks passed
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