-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Try new stripe Pricing Table (#486)
- Loading branch information
Showing
3 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"use client"; | ||
|
||
import React, { useEffect } from "react"; | ||
|
||
export const StripePricingTable = () => { | ||
useEffect(() => { | ||
const script = document.createElement("script"); | ||
script.src = "https://js.stripe.com/v3/pricing-table.js"; | ||
script.async = true; | ||
document.body.appendChild(script); | ||
return () => { | ||
document.body.removeChild(script); | ||
}; | ||
}, []); | ||
|
||
return React.createElement("stripe-pricing-table", { | ||
"pricing-table-id": "prctbl_1OOqJhA852XqldwXWBnBH1qL", | ||
"publishable-key": "pk_live_O6JxAuRV03zH5EC0V2aEqD1F00PqJvtIsb", | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Spacer, Text } from "@/components/Geist"; | ||
import React from "react"; | ||
import { dictionary } from "@/dictionaries"; | ||
import { Nav } from "@/components/Nav/Nav"; | ||
import { Footer } from "@/components/Footer"; | ||
import { StripePricingTable } from "./StripePricingTable"; | ||
|
||
export const metadata = { | ||
title: "Pricing", | ||
}; | ||
|
||
export default async function Pricing({ | ||
params: { lang }, | ||
}: { | ||
params: { lang: string }; | ||
}) { | ||
const d = await dictionary(lang); | ||
|
||
return ( | ||
<> | ||
<Nav d={d} /> | ||
<Spacer h={5} /> | ||
<Text className="text-center" h2> | ||
{d.pricing.title} | ||
</Text> | ||
<Text p em className="text-center"> | ||
{d.pricing["30d_money_back"]} | ||
</Text> | ||
|
||
<Spacer h={2} /> | ||
|
||
<StripePricingTable /> | ||
<Footer d={d} /> | ||
</> | ||
); | ||
} |