'use client'; import { useState } from 'react'; import { WhyMyRatingLogo, PreviewScaler } from '@/components'; export function CTATemplateLandscape() { const [hook, setHook] = useState('Still reading reviews one by one?'); const [valueProp, setValueProp] = useState('Get AI-powered insights in 45 seconds'); const [ctaText, setCtaText] = useState('Try it free at whyrating.com'); const [isDownloading, setIsDownloading] = useState(false); const downloadPng = async () => { setIsDownloading(true); try { const response = await fetch('/api/screenshot', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ template: 'cta-landscape', params: { hook, valueProp, ctaText } }), }); if (!response.ok) throw new Error('Screenshot failed'); const blob = await response.blob(); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.download = `whyrating-cta-landscape-${Date.now()}.png`; link.href = url; link.click(); URL.revokeObjectURL(url); } catch (error) { console.error('Download failed:', error); alert('Download failed. Please try again.'); } finally { setIsDownloading(false); } }; return (

CTA Post (Landscape)

1200 × 675px • LinkedIn, Twitter

{/* Preview */}
{/* Decorative stars */}
{/* Content */}
{hook}
{valueProp}
{ctaText}
{/* Footer */}
{/* Editor */}
setHook(e.target.value)} className="w-full px-3 py-2 border border-slate-300 dark:border-stone-600 rounded-lg bg-white dark:bg-stone-800 text-slate-900 dark:text-stone-50 focus:ring-2 focus:ring-[var(--ui-primary)] focus:border-transparent" placeholder="Still reading reviews one by one?" />