Files
songs2vid/components/UpgradeProLink.tsx
T
Atakan Doğan Özban 9404efd86c Align preview typography with FFmpeg output, add video/song title split, and ship OSS updates.
Separate YouTube video titles from on-video song/artist fields with Pro gating, serve curated fonts and watermark assets for 1:1 preview parity, and include billing/API/docs/deploy stack for self-hosted release.
2026-07-27 16:26:19 +02:00

35 lines
950 B
TypeScript

import Link from "next/link";
import type { ReactNode } from "react";
import { PRO_UPGRADE_REQUIRED_SUFFIX } from "@/lib/credits";
import { UPGRADE_URL } from "@/lib/plans";
import { UpgradeProButton } from "@/components/UpgradeProButton";
type Props = {
className?: string;
children?: ReactNode;
};
export function UpgradeProLink({ className = "text-accent hover:underline", children }: Props) {
return (
<Link href={UPGRADE_URL} className={className}>
{children ?? "Upgrade to Pro"}
</Link>
);
}
export function QuotaErrorMessage({ message }: { message: string }) {
if (message.endsWith(PRO_UPGRADE_REQUIRED_SUFFIX)) {
return (
<>
{message.slice(0, -PRO_UPGRADE_REQUIRED_SUFFIX.length)}{" "}
<UpgradeProButton
className="font-medium text-red-200 underline hover:text-white"
label="Upload up to 50 videos with Pro!"
/>
</>
);
}
return <>{message}</>;
}