mirror of
https://github.com/jnsahaj/tweakcn.git
synced 2026-08-30 18:10:28 +08:00
remove lmsqueezy script and link and use direct referral
This commit is contained in:
+5
-6
@@ -11,7 +11,7 @@ import Shadcraft from "@/assets/shadcraft.svg";
|
||||
import FigmaIcon from "@/assets/figma.svg";
|
||||
import { Check, X, ArrowUpRight, Figma, Cable, Paintbrush } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { FIGMA_CONSTANTS, createPurchaseUrl } from "@/lib/figma-constants";
|
||||
import { FIGMA_CONSTANTS, redirectToShadcraft } from "@/lib/figma-constants";
|
||||
|
||||
export default function FigmaPage() {
|
||||
const [isScrolled, setIsScrolled] = useState(false);
|
||||
@@ -29,9 +29,8 @@ export default function FigmaPage() {
|
||||
),
|
||||
}));
|
||||
|
||||
const handlePurchase = () => {
|
||||
const url = createPurchaseUrl("/");
|
||||
window.open(url, "_blank");
|
||||
const handleGetStarted = () => {
|
||||
redirectToShadcraft();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -143,7 +142,7 @@ export default function FigmaPage() {
|
||||
</h1>
|
||||
|
||||
<div className="flex justify-center gap-3.5">
|
||||
<Button size="lg" className="h-10 px-8" onClick={handlePurchase}>
|
||||
<Button size="lg" className="h-10 px-8" onClick={handleGetStarted}>
|
||||
Get started
|
||||
</Button>
|
||||
<Link href={FIGMA_CONSTANTS.previewUrl} target="_blank" rel="noopener noreferrer">
|
||||
@@ -253,7 +252,7 @@ export default function FigmaPage() {
|
||||
<div className="text-muted-foreground text-sm line-through">$119</div>
|
||||
</div>
|
||||
<div className="flex gap-3">
|
||||
<Button className="flex-1" onClick={handlePurchase}>
|
||||
<Button className="flex-1" onClick={handleGetStarted}>
|
||||
Get started
|
||||
</Button>
|
||||
<Link
|
||||
|
||||
@@ -11,7 +11,6 @@ import type { Metadata, Viewport } from "next";
|
||||
import { NuqsAdapter } from "nuqs/adapters/next/app";
|
||||
import { Suspense } from "react";
|
||||
import "./globals.css";
|
||||
import Script from "next/script";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Beautiful themes for shadcn/ui — tweakcn | Theme Editor & Generator",
|
||||
@@ -57,20 +56,6 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||
<head>
|
||||
<ThemeScript />
|
||||
<DynamicFontLoader />
|
||||
<Script
|
||||
id="shadcraft"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.lemonSqueezyAffiliateConfig = {
|
||||
store: 'mystore', // Replace with your store's subdomain
|
||||
trackOnLoad: false,
|
||||
onReady: function(e) {
|
||||
e.Track('6NjlYZ');
|
||||
}
|
||||
}`,
|
||||
}}
|
||||
/>
|
||||
<Script id="affiliate" src="https://lmsqueezy.com/affiliate.js" defer />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" href="/favicon.ico" sizes="any" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
|
||||
@@ -10,7 +10,7 @@ import Shadcraft from "@/assets/shadcraft.svg";
|
||||
import FigmaIcon from "@/assets/figma.svg";
|
||||
import { Check, X, ArrowUpRight, Figma, Cable, Paintbrush } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { FIGMA_CONSTANTS, createPurchaseUrl } from "@/lib/figma-constants";
|
||||
import { FIGMA_CONSTANTS, redirectToShadcraft } from "@/lib/figma-constants";
|
||||
interface FigmaExportDialogProps {
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
@@ -29,9 +29,8 @@ export function FigmaExportDialog({ open, onOpenChange }: FigmaExportDialogProps
|
||||
),
|
||||
}));
|
||||
|
||||
const handlePurchase = () => {
|
||||
const url = createPurchaseUrl("/");
|
||||
window.open(url, "_blank");
|
||||
const handleGetStarted = () => {
|
||||
redirectToShadcraft();
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -62,7 +61,7 @@ export function FigmaExportDialog({ open, onOpenChange }: FigmaExportDialogProps
|
||||
</h1>
|
||||
|
||||
<div className="flex justify-center gap-3.5">
|
||||
<Button size="lg" className="h-10 px-8" onClick={handlePurchase}>
|
||||
<Button size="lg" className="h-10 px-8" onClick={handleGetStarted}>
|
||||
Get started
|
||||
</Button>
|
||||
<Link href={FIGMA_CONSTANTS.previewUrl} target="_blank">
|
||||
@@ -157,7 +156,7 @@ export function FigmaExportDialog({ open, onOpenChange }: FigmaExportDialogProps
|
||||
<div className="text-muted-foreground text-sm line-through">$119</div>
|
||||
</div>
|
||||
<div className="flex gap-3">
|
||||
<Button className="flex-1" onClick={handlePurchase}>
|
||||
<Button className="flex-1" onClick={handleGetStarted}>
|
||||
Get started
|
||||
</Button>
|
||||
<Link href={FIGMA_CONSTANTS.previewUrl} target="_blank">
|
||||
|
||||
@@ -2,7 +2,6 @@ export const FIGMA_CONSTANTS = {
|
||||
shadcraftUrl: "https://shadcraft.com?aff=6NjlYZ",
|
||||
previewUrl:
|
||||
"https://www.figma.com/design/J1e0cfCkDffMx6I0D0g5Nd/PREVIEW-%E2%80%A2-Shadcraft-%E2%80%A2-Beta-0.1.0?node-id=7050-2702&p=f&m=dev",
|
||||
purchaseUrl: "https://shadcraft.lemonsqueezy.com/buy/ce9ced1d-3119-413d-82b8-a4baef6aab36",
|
||||
designers: [
|
||||
{ name: "Designer 1", avatar: "/figma-onboarding/avatar-1.png", fallback: "D1" },
|
||||
{ name: "Designer 2", avatar: "/figma-onboarding/avatar-2.png", fallback: "D2" },
|
||||
@@ -36,6 +35,6 @@ export const FIGMA_CONSTANTS = {
|
||||
],
|
||||
};
|
||||
|
||||
export const createPurchaseUrl = (successRedirectUrl: string = "/") => {
|
||||
return `${FIGMA_CONSTANTS.purchaseUrl}?embed=1&aff=6NjlYZ&redirect_url=${encodeURIComponent(successRedirectUrl)}`;
|
||||
export const redirectToShadcraft = () => {
|
||||
window.open(FIGMA_CONSTANTS.shadcraftUrl, "_blank");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user