Skip to content

Fix duplicate nested Button in ArticleCard causing build failure#42

Draft
sheenyg with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-workflow-again
Draft

Fix duplicate nested Button in ArticleCard causing build failure#42
sheenyg with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-workflow-again

Conversation

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

The deploy workflow was failing due to duplicate nested Button components in ArticleCard.tsx causing JSX syntax errors.

Changes:

  • Removed duplicate Button component (lines 69-85) that was incorrectly nested inside the first Button
  • Properly closed the first Button element at line 69

The duplicate Button had identical props and content but lacked the handleButtonClick wrapper in its onClick handler. The fix preserves the correct implementation with proper event handling.

// Before: Invalid JSX with nested Button
<Button onClick={(e) => { handleButtonClick(e); onToggleRead(article.id) }}>
  {article.isRead ? <><ArrowCounterClockwise />Mark Unread</> : <><Check />Mark Read</>}
  <Button onClick={() => onToggleRead(article.id)}>  // ❌ Duplicate nested Button
    {/* Same content repeated */}
  </Button>
</div>

// After: Valid JSX structure
<Button onClick={(e) => { handleButtonClick(e); onToggleRead(article.id) }}>
  {article.isRead ? <><ArrowCounterClockwise />Mark Unread</> : <><Check />Mark Read</>}
</Button>
Original prompt

Fix the failing GitHub Actions workflow deploy

Analyze the workflow logs, identify the root cause of the failure, and implement a fix.

Job ID: 60137733733

Job URL: https://github.com/sheenyg/wouldreads/actions/runs/20929886909/job/60137733733


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…mponent

Co-authored-by: sheenyg <25390061+sheenyg@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow deploy Fix duplicate nested Button in ArticleCard causing build failure Jan 12, 2026
Copilot AI requested a review from sheenyg January 12, 2026 18:23
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