Files
memorium/routes/admin/cache/index.tsx
2026-01-10 13:03:29 +01:00

32 lines
705 B
TypeScript

import { MainLayout } from "@components/layouts/main.tsx";
import { PageProps } from "fresh";
import { getCacheInfo } from "@lib/cache.ts";
import { define } from "../../../utils.ts";
export const handler = define.handlers({
GET() {
return { data: { cacheInfo: getCacheInfo() } };
},
});
export default function Greet(
props: PageProps<
{ cacheInfo: ReturnType<typeof getCacheInfo> }
>,
) {
const { cacheInfo } = props.data;
return (
<MainLayout
url={props.url}
title="Recipes"
context={{ type: "recipes" }}
>
<code>
<pre class="text-white">
{JSON.stringify(cacheInfo, null, 2)}
</pre>
</code>
</MainLayout>
);
}