import { Handlers, PageProps } from '$fresh/server.ts' import { Task } from '@homeman/models.ts' import { Routine } from '@homeman/islands/Routine.tsx' import { db } from '@homeman/db.ts' // import { db, kv, Todo, UserWithTodos } from '@homeman/models.ts' interface Data { tasks: Task[] } export const handler: Handlers = { async GET(_req, ctx) { const tasks = await db.tasks.findMany({}) return ctx.render({ tasks }) }, } export default function Page(props: PageProps) { return }