Fixed partial handling and added cookies

This commit is contained in:
Kevin FEDYNA
2025-01-21 16:09:36 +01:00
parent b364f6cbab
commit fa66621abc
12 changed files with 158 additions and 48 deletions
+8 -6
View File
@@ -1,10 +1,12 @@
import { EmptyObject } from "$root/defaults/interfaces.ts";
import { FreshContext } from "$fresh/server.ts";
import { State } from "$root/routes/_middleware.ts";
export default function makeIndex<
IndexProps = EmptyObject,
>(basePath: string) {
return async function Index(props: IndexProps) {
export default function makeIndex(basePath: string) {
return async function Index(
request: Request,
context: FreshContext<State>,
) {
const index = (await import(`${basePath}/partials/index.tsx`)).Index;
return index(props);
return index(request, context);
};
}