mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-02 10:41:54 +02:00
♻️ Move paddle script
This commit is contained in:
parent
30f57948e2
commit
1d79f117b3
2 changed files with 14 additions and 14 deletions
|
@ -8,7 +8,6 @@ import { NextPage } from "next";
|
||||||
import { AppProps } from "next/app";
|
import { AppProps } from "next/app";
|
||||||
import { Inter } from "next/font/google";
|
import { Inter } from "next/font/google";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import Script from "next/script";
|
|
||||||
import { SessionProvider, signIn, useSession } from "next-auth/react";
|
import { SessionProvider, signIn, useSession } from "next-auth/react";
|
||||||
import { appWithTranslation } from "next-i18next";
|
import { appWithTranslation } from "next-i18next";
|
||||||
import { DefaultSeo } from "next-seo";
|
import { DefaultSeo } from "next-seo";
|
||||||
|
@ -85,19 +84,6 @@ const MyApp: NextPage<AppPropsWithLayout> = ({ Component, pageProps }) => {
|
||||||
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, user-scalable=yes"
|
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, user-scalable=yes"
|
||||||
/>
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
{process.env.NEXT_PUBLIC_PADDLE_VENDOR_ID ? (
|
|
||||||
<Script
|
|
||||||
src="https://cdn.paddle.com/paddle/paddle.js"
|
|
||||||
onLoad={() => {
|
|
||||||
if (process.env.NEXT_PUBLIC_PADDLE_SANDBOX === "true") {
|
|
||||||
window.Paddle.Environment.set("sandbox");
|
|
||||||
}
|
|
||||||
window.Paddle.Setup({
|
|
||||||
vendor: Number(process.env.NEXT_PUBLIC_PADDLE_VENDOR_ID),
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
<style jsx global>{`
|
<style jsx global>{`
|
||||||
html {
|
html {
|
||||||
--font-inter: ${inter.style.fontFamily};
|
--font-inter: ${inter.style.fontFamily};
|
||||||
|
|
|
@ -6,6 +6,7 @@ import dayjs from "dayjs";
|
||||||
import { GetStaticProps } from "next";
|
import { GetStaticProps } from "next";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import Script from "next/script";
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import { BillingPlans } from "@/components/billing/billing-plans";
|
import { BillingPlans } from "@/components/billing/billing-plans";
|
||||||
|
@ -106,6 +107,19 @@ const LegacyBilling = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
|
{process.env.NEXT_PUBLIC_PADDLE_VENDOR_ID ? (
|
||||||
|
<Script
|
||||||
|
src="https://cdn.paddle.com/paddle/paddle.js"
|
||||||
|
onLoad={() => {
|
||||||
|
if (process.env.NEXT_PUBLIC_PADDLE_SANDBOX === "true") {
|
||||||
|
window.Paddle.Environment.set("sandbox");
|
||||||
|
}
|
||||||
|
window.Paddle.Setup({
|
||||||
|
vendor: Number(process.env.NEXT_PUBLIC_PADDLE_VENDOR_ID),
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
<div className="grid gap-4 p-4 sm:grid-cols-2">
|
<div className="grid gap-4 p-4 sm:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<Label>
|
<Label>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue