feat: completely remove credits and promocodes across tool pages, pricing, and all app configs
This commit is contained in:
@@ -13,7 +13,6 @@ import {
|
||||
Star,
|
||||
Layers,
|
||||
CheckCircle2,
|
||||
Gift,
|
||||
ArrowRight
|
||||
} from 'lucide-react';
|
||||
import { ToolItem, AppItem, resolveLocalised } from '@/types';
|
||||
@@ -34,7 +33,6 @@ export function PostResultAppHandoff({
|
||||
variant = 'post-result',
|
||||
}: PostResultAppHandoffProps) {
|
||||
const [qrDataUrl, setQrDataUrl] = useState<string>('');
|
||||
const [copiedPromo, setCopiedPromo] = useState(false);
|
||||
const [copiedLink, setCopiedLink] = useState(false);
|
||||
const [origin, setOrigin] = useState<string>('');
|
||||
|
||||
@@ -68,11 +66,6 @@ export function PostResultAppHandoff({
|
||||
count: 28400,
|
||||
source: 'App Store & Google Play',
|
||||
},
|
||||
welcomeBonus: {
|
||||
code: 'TRYWEB50',
|
||||
title: '50 Free Pro Credits',
|
||||
description: 'Install through this link to claim 50 free HD export credits.',
|
||||
},
|
||||
features: [
|
||||
'Unlimited 4K batch processing for full galleries',
|
||||
'Lossless RAW & Ultra-HD PNG export without compression',
|
||||
@@ -82,13 +75,12 @@ export function PostResultAppHandoff({
|
||||
};
|
||||
|
||||
const appName = resolveLocalised(appData.name, locale);
|
||||
const appTagline = resolveLocalised(appData.tagline, locale);
|
||||
const bonusCode = appData.welcomeBonus?.code || 'TRYWEB50';
|
||||
const toolName = tool.name ? resolveLocalised(tool.name, locale) : 'Photo Tools';
|
||||
|
||||
const baseHost = origin || 'http://localhost:3000';
|
||||
const targetUrl = `${baseHost}/go/${tool.slug}/${appData.slug}?promo=${bonusCode}&src=${variant}`;
|
||||
const iosUrl = appData.stores?.ios?.url || `/go/${tool.slug}/${appData.slug}?promo=${bonusCode}&src=ios`;
|
||||
const androidUrl = appData.stores?.android?.url || `/go/${tool.slug}/${appData.slug}?promo=${bonusCode}&src=android`;
|
||||
const targetUrl = `${baseHost}/go/${tool.slug}/${appData.slug}?src=${variant}`;
|
||||
const iosUrl = appData.stores?.ios?.url || `/go/${tool.slug}/${appData.slug}?src=ios`;
|
||||
const androidUrl = appData.stores?.android?.url || `/go/${tool.slug}/${appData.slug}?src=android`;
|
||||
|
||||
// Generate dynamic QR Code for instant phone handoff
|
||||
useEffect(() => {
|
||||
@@ -104,13 +96,6 @@ export function PostResultAppHandoff({
|
||||
.catch((err) => console.error('Failed to generate QR code:', err));
|
||||
}, [targetUrl]);
|
||||
|
||||
const handleCopyPromo = (e: React.MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
navigator.clipboard.writeText(bonusCode);
|
||||
setCopiedPromo(true);
|
||||
setTimeout(() => setCopiedPromo(false), 2200);
|
||||
};
|
||||
|
||||
const handleCopyLink = (e: React.MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
navigator.clipboard.writeText(targetUrl);
|
||||
@@ -135,8 +120,8 @@ export function PostResultAppHandoff({
|
||||
<strong>HD result saved!</strong> Need to edit more photos? Get <strong>{appName}</strong> for unlimited 4K batch processing.
|
||||
</span>
|
||||
</div>
|
||||
<span className="hidden sm:inline-block px-2.5 py-1 rounded-full bg-emerald-600 text-white font-mono text-xs font-bold shrink-0">
|
||||
50 CREDITS UNLOCKED
|
||||
<span className="hidden sm:inline-block px-2.5 py-1 rounded-full bg-emerald-600 text-white font-sans text-xs font-semibold shrink-0">
|
||||
4K UNLIMITED READY
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -144,7 +129,7 @@ export function PostResultAppHandoff({
|
||||
{/* Primary Conversion Header */}
|
||||
<div className="flex flex-col lg:flex-row lg:items-center justify-between gap-4 pb-6 border-b border-rule">
|
||||
<div className="space-y-2">
|
||||
{/* Rating & Bonus Pill */}
|
||||
{/* Rating & App Badge Pill */}
|
||||
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-accent/10 border border-accent/20 text-accent font-sans text-xs font-semibold">
|
||||
<div className="flex items-center gap-0.5 text-amber-500">
|
||||
<Star className="w-3.5 h-3.5 fill-amber-400 text-amber-400" />
|
||||
@@ -153,48 +138,39 @@ export function PostResultAppHandoff({
|
||||
<span className="text-slate-300">|</span>
|
||||
<span className="text-slate-700">Official Mobile App</span>
|
||||
<span className="text-slate-300">|</span>
|
||||
<span className="text-accent font-bold tracking-tight">50 Free Bonus Credits</span>
|
||||
<span className="text-accent font-bold tracking-tight">Lossless 4K Mobile Studio</span>
|
||||
</div>
|
||||
|
||||
<h3 className="text-xl sm:text-2xl font-display font-bold text-slate-900 tracking-tight">
|
||||
{variant === 'post-result'
|
||||
? `Love this result? Take it further in ${appName}`
|
||||
: `Experience ${tool.name ? resolveLocalised(tool.name, locale) : 'Photo Tools'} in ${appName}`}
|
||||
: `Experience ${toolName} in ${appName}`}
|
||||
</h3>
|
||||
<p className="text-xs sm:text-sm text-slate-600 font-sans max-w-2xl leading-relaxed">
|
||||
The web studio is limited to 5 single-photo tries daily. Install our native mobile app to process full photo galleries in <strong>4K lossless resolution</strong> with zero wait times.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Voucher Code Box */}
|
||||
<div className="shrink-0 p-3.5 rounded-2xl bg-paper-2 border border-rule flex items-center justify-between lg:justify-start gap-3">
|
||||
{/* Mobile Platform Badge */}
|
||||
<div className="shrink-0 p-3.5 rounded-2xl bg-paper-2 border border-rule flex items-center justify-between lg:justify-start gap-4">
|
||||
<div className="space-y-0.5">
|
||||
<div className="flex items-center gap-1.5 text-[11px] font-sans font-semibold text-slate-500 uppercase tracking-wider">
|
||||
<Gift className="w-3.5 h-3.5 text-accent" />
|
||||
<span>Welcome Voucher</span>
|
||||
<Smartphone className="w-3.5 h-3.5 text-accent" />
|
||||
<span>Platform Compatibility</span>
|
||||
</div>
|
||||
<span className="font-mono font-bold text-sm text-slate-900 tracking-wider">
|
||||
{bonusCode}
|
||||
<span className="font-sans font-semibold text-xs text-slate-900 tracking-tight block">
|
||||
iOS 15+ • Android 9+
|
||||
</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleCopyPromo}
|
||||
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-xs font-sans font-semibold bg-white hover:bg-slate-100 text-slate-800 border border-slate-200 shadow-2xs transition-all cursor-pointer"
|
||||
title="Copy promo voucher"
|
||||
<a
|
||||
href={targetUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-xs font-sans font-semibold bg-accent text-white hover:bg-accent/90 shadow-2xs transition-all cursor-pointer shrink-0"
|
||||
>
|
||||
{copiedPromo ? (
|
||||
<>
|
||||
<Check className="w-3.5 h-3.5 text-emerald-600" />
|
||||
<span className="text-emerald-700 font-bold">Copied!</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Copy className="w-3.5 h-3.5 text-slate-500" />
|
||||
<span>Copy</span>
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
<span>Get App</span>
|
||||
<ArrowRight className="w-3.5 h-3.5" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -351,7 +327,7 @@ export function PostResultAppHandoff({
|
||||
|
||||
<div className="space-y-1">
|
||||
<p className="text-[11px] text-slate-600 font-sans leading-tight">
|
||||
Instantly opens App Store or Google Play with promo code <strong>{bonusCode}</strong> applied.
|
||||
Instantly opens App Store or Google Play directly on your phone.
|
||||
</p>
|
||||
<span className="inline-block text-[10px] text-slate-400 font-sans">
|
||||
Works on iOS 15+ and Android 9+
|
||||
|
||||
Reference in New Issue
Block a user