First Commit. Duplicate bunext-sqlite preset

This commit is contained in:
2026-10-18 16:47:11 +01:00
commit 81e4a8aecc
718 changed files with 41695 additions and 0 deletions
@@ -0,0 +1,33 @@
import { renderToStaticMarkup } from "react-dom/server";
import path from "path";
import type { FC } from "react";
import type { PagePropsType } from "@/src/types";
import type { BunextPageServerFn } from "@moduletrace/bunext/types";
import EmailTemplateContent from "./(data)/email-template-content";
export const server: BunextPageServerFn<PagePropsType> = async () => {
try {
const now = Date.now();
const EmailRoot = (
await import(path.join(process.cwd(), `src/email/root?t=${now}`))
).default as FC<any>;
const html = renderToStaticMarkup(
<EmailRoot>
<EmailTemplateContent />
</EmailRoot>,
);
return {
props: {
email_template_html: html,
},
};
} catch (error: any) {
return {
props: {
email_template_html: "",
},
};
}
};