diff --git a/package.json b/package.json index 6bb459bb..9ae382bc 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-dropzone": "^14.2.3", + "sharp": "^0.33.5", "stripe": "^9.13.0" }, "devDependencies": { diff --git a/scripts/license.ts b/scripts/license.ts index 9e33b7d8..ec8fdec5 100644 --- a/scripts/license.ts +++ b/scripts/license.ts @@ -1,15 +1,15 @@ -import { addMonths } from 'date-fns'; -import { writeFile } from 'fs/promises'; -import { tmpdir } from 'os'; +import { addMonths } from "date-fns"; +import { writeFile } from "fs/promises"; +import { tmpdir } from "os"; -import { generateLicense } from '../src/util/license'; +import { generateLicense } from "../src/util/license"; async function main(): Promise { const myArgs = process.argv.slice(2); if (myArgs.length < 2 || myArgs.length > 3) { console.error( - 'Usage: yarn gen:license [name] [email] [address] [optional_start_date]' + "Usage: yarn gen:license [name] [email] [address] [optional_start_date]" ); process.exit(1); } @@ -18,8 +18,8 @@ async function main(): Promise { // Generate with dummy data. const pdf = await generateLicense({ - backend_version: '0.3.x', - ciee_version: '0.8.x', + backend_version: "0.7.x", + ciee_version: "0.8.x | 0.9.x", license_end_date: addMonths(startDate, 1), number_devs: 25, stripe_buy_date: startDate, diff --git a/src/app/[lang]/legal/LegalPage.tsx b/src/app/[lang]/legal/LegalPage.tsx new file mode 100644 index 00000000..acbab46f --- /dev/null +++ b/src/app/[lang]/legal/LegalPage.tsx @@ -0,0 +1,31 @@ +import axios from "axios"; + +import { Md } from "./Md"; +import { Nav } from "@/components/Nav/Nav"; +import { Page } from "@/components/Geist"; +import { dictionary } from "@/dictionaries"; +import { Footer } from "@/components/Footer"; +import { removeFrontMatter } from "@/components/Markdown"; + +export async function LegalPage( + contentUrl: string, + { + params: { lang }, + }: { + params: { lang: string }; + } +) { + const { data } = await axios.get(contentUrl); + const content = removeFrontMatter(data); + const d = await dictionary(lang); + + return ( + <> +