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
+3 -4
View File
@@ -77,15 +77,14 @@ function getIndexContent(_name: string) {
function getPartialIndexContent(name: string) {
return `
import { EmptyObject } from "$root/defaults/interfaces.ts";
import {
getPartialsConfig,
makePartials,
} from "$root/defaults/makePartials.tsx";
import { FreshContext } from "$fresh/server.ts";
import { State } from "$root/routes/_middleware.ts";
type ${name}IndexProps = EmptyObject;
export function Index(_props: ${name}IndexProps) {
export async function Index(request: Request, context: FreshContext<State>) {
return <h2>Welcome to ${name}.</h2>;
}