feat: completely remove credits and promocodes across tool pages, pricing, and all app configs

This commit is contained in:
2026-11-12 17:57:08 +05:30
parent f56aacdae8
commit ec609c5d4a
156 changed files with 233 additions and 321 deletions
+24 -36
View File
@@ -7,7 +7,8 @@ import {
Copy,
Check,
ExternalLink,
ShieldCheck
Zap,
Sparkles
} from 'lucide-react';
import { AppItem, ToolItem, resolveLocalised } from '@/types';
import { KineticText } from '@/components/magicui/kinetic-text';
@@ -28,7 +29,6 @@ export function AppHandoffSection({
showQr = true,
}: AppHandoffSectionProps) {
const [qrDataUrl, setQrDataUrl] = useState<string>('');
const [copiedPromo, setCopiedPromo] = useState(false);
const [copiedLink, setCopiedLink] = useState(false);
const [origin, setOrigin] = useState<string>('');
@@ -40,11 +40,10 @@ export function AppHandoffSection({
if (!app) return null;
const bonusCode = app.welcomeBonus?.code || 'TRYWEB50';
const baseHost = origin || 'http://localhost:3000';
const targetUrl = tool
? `${baseHost}/go/${tool.slug}/${app.slug}?promo=${bonusCode}`
: `${baseHost}/apps/${app.slug}?promo=${bonusCode}`;
? `${baseHost}/go/${tool.slug}/${app.slug}`
: `${baseHost}/apps/${app.slug}`;
useEffect(() => {
if (showQr) {
@@ -61,12 +60,6 @@ export function AppHandoffSection({
}
}, [showQr, targetUrl]);
const copyPromo = () => {
navigator.clipboard.writeText(bonusCode);
setCopiedPromo(true);
setTimeout(() => setCopiedPromo(false), 2000);
};
const copyLink = () => {
navigator.clipboard.writeText(targetUrl);
setCopiedLink(true);
@@ -95,7 +88,7 @@ export function AppHandoffSection({
<KineticText>Continue on mobile</KineticText>
</h2>
<p className="text-sm sm:text-base text-ink-2 font-body text-pretty">
Handoff this tool directly to your iOS or Android phone with 50 bonus credits.
Handoff this tool directly to your iOS or Android phone for lossless 4K mobile processing.
</p>
</div>
@@ -112,30 +105,25 @@ export function AppHandoffSection({
</p>
</div>
{/* Promo Voucher */}
{/* Mobile Studio Capabilities */}
{showBonus && (
<div className="p-4 bg-paper-2 border border-rule rounded-2xl flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3">
<div className="space-y-0.5">
<span className="text-xs font-body font-semibold text-ink">
50 Free credits voucher code
</span>
<p className="text-xs text-muted font-body">
Enter during installation for complimentary batch runs.
</p>
</div>
<div className="flex items-center gap-2">
<span className="font-body text-sm font-semibold text-accent px-3 py-1 bg-paper-hi border border-rule rounded-full">
{bonusCode}
</span>
<button
type="button"
onClick={copyPromo}
className="btn-secondary text-xs px-3 py-1.5 rounded-full min-h-[36px]"
aria-label="Copy voucher code"
>
{copiedPromo ? <Check className="w-3.5 h-3.5 text-accent" aria-hidden="true" /> : <Copy className="w-3.5 h-3.5 text-muted" aria-hidden="true" />}
</button>
<div className="flex items-center gap-3">
<div className="w-8 h-8 rounded-xl bg-accent/10 flex items-center justify-center shrink-0">
<Sparkles className="w-4 h-4 text-accent" />
</div>
<div className="space-y-0.5">
<span className="text-xs font-body font-semibold text-ink">
Lossless 4K & Batch Processing
</span>
<p className="text-xs text-muted font-body">
Hardware neural acceleration for rapid multi-photo exports.
</p>
</div>
</div>
<span className="font-body text-xs font-semibold text-accent px-3 py-1 bg-paper-hi border border-rule rounded-full shrink-0">
Native Mobile Studio
</span>
</div>
)}
@@ -178,7 +166,7 @@ export function AppHandoffSection({
</div>
<div className="pt-2 text-xs text-muted font-body">
{resolveLocalised(app.creditsNote, locale, 'Credits and in-app purchases are specific to this app.')}
{resolveLocalised(app.creditsNote, locale, 'In-app purchases and subscriptions are managed securely via Apple App Store and Google Play.')}
</div>
</div>
@@ -190,14 +178,14 @@ export function AppHandoffSection({
<div className="p-4 bg-paper-hi border border-rule rounded-2xl inline-block shadow-sm">
<img
src={qrDataUrl}
alt="Scan QR code to install app"
alt={`Scan QR code to install ${appName}`}
className="w-44 h-44 object-contain rounded-xl"
/>
</div>
<div className="mt-4 space-y-1 text-xs font-body text-muted">
<p className="font-medium text-ink">Instant mobile handoff</p>
<p>Directs to App Store or Google Play with {bonusCode} applied automatically.</p>
<p>Directs to App Store or Google Play for instantaneous installation.</p>
</div>
</div>
)}