Back
Version 52
3/20/2024
/** @jsxImportSource https://esm.sh/react */
import { getLatestPageVersionDb } from "https://esm.town/v/rwev/getLatestPageVersionDb";
import { renderToString } from "npm:react-dom/server";
export const myPage = async () => {
const pageRows = await getLatestPageVersionDb();
const page = pageRows[0];
return new Response(
renderToString(
<div>
<form action="https://rwev-handleSavePageForm.web.val.run/" method="post">
<textarea id="text">{page.value}</textarea>
<input type="submit" value="Submit" />
</form>
<small>{page.dt}, version {page.id}</small>
</div>,
),
{
headers: {
"Content-Type": "text/html",
},
},
);
};
rwev-page.web.val.run
Updated: March 23, 2024