Consolidate Q&A share buttons — X and Facebook now share image; v1.0.13

Replaced the separate text-link X/FB buttons and the duplicate image buttons
with a single X and Facebook button each that share the generated quote card.
Keeps button row to 5: Upvote, X Share, Facebook Share, Copy link, Save image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-07-22 12:59:06 -04:00
parent ff7eec9906
commit 7ca457bb04
2 changed files with 4 additions and 12 deletions
+3 -11
View File
@@ -1044,7 +1044,7 @@ export default function QASection() {
type="button"
aria-label="Share on X"
className="qa-social-btn qa-social-btn--x"
onClick={() => shareToX(question)}
onClick={() => shareImageTo(question, 'x')}
>
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
<span>Share</span>
@@ -1053,10 +1053,10 @@ export default function QASection() {
type="button"
aria-label="Share on Facebook"
className="qa-social-btn qa-social-btn--fb"
onClick={() => shareToFacebook(question)}
onClick={() => shareImageTo(question, 'facebook')}
>
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M24 12.073C24 5.404 18.627 0 12 0S0 5.404 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.884v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"/></svg>
<span>{facebookCaptionCopied ? 'Caption copied' : 'Share'}</span>
<span>Share</span>
</button>
<button type="button" className="qa-share-btn" onClick={() => shareQuestion(question.id)}>
{linkCopied ? '✓ Copied' : 'Copy link'}
@@ -1064,14 +1064,6 @@ export default function QASection() {
<button type="button" className="qa-share-btn" onClick={() => saveAsImage(question)}>
Save image
</button>
<button type="button" className="qa-social-btn qa-social-btn--x" onClick={() => shareImageTo(question, 'x')}>
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
<span>Image</span>
</button>
<button type="button" className="qa-social-btn qa-social-btn--fb" onClick={() => shareImageTo(question, 'facebook')}>
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M24 12.073C24 5.404 18.627 0 12 0S0 5.404 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.884v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"/></svg>
<span>Image</span>
</button>
</div>
{(facebookCaptionCopied || linkCopied) && (
<p className="qa-share-feedback" role="status" aria-live="polite">