Beautiful pdf components, built on Takumi and Forme. 100% Free, Zero config, one command setup.
refactor: hand the element straight to render
Kane Wang3e608c319256
diff --git a/app/api/pdf/takumi/route.tsx b/app/api/pdf/takumi/route.tsxindex e848668..a066260 100644--- a/app/api/pdf/takumi/route.tsx+++ b/app/api/pdf/takumi/route.tsx@@ -19,18 +19,16 @@ export const GET = async (request: Request) => {try {const Demo = takumiDemos[name];- const { node, stylesheets } = await fromJsx(<Demo />);if (searchParams.get("format") === "document") {- return Response.json({ node, stylesheets });+ return Response.json(await fromJsx(<Demo />));}const logo = await readFile(path.join(process.cwd(), "public/favicon.png"));- const pdf = await render(node, {+ const pdf = await render(<Demo />, {...getTakumiPreviewOptions(name),images: {sources: [{ data: logo, src: "/favicon.png" }],},- stylesheets,});return new Response(Buffer.from(pdf), {