From c3ddda83db76c82d3dbe75c4dcd5e0747e489ea4 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Sun, 3 Mar 2024 21:28:33 -0500 Subject: [PATCH] Reorganize the TSX to handle making the pages. --- app/src/frontend/layout.tsx | 27 ++++++++++++---------- app/src/frontend/layout/login-form.tsx | 31 ++++++++++++++++++++++++++ app/src/frontend/pages/login.tsx | 11 +++++++++ app/src/index.tsx | 17 ++++++++++++-- app/src/middleware/config.ts | 12 +++------- app/src/model/SiteData.ts | 8 +++++-- 6 files changed, 81 insertions(+), 25 deletions(-) create mode 100644 app/src/frontend/layout/login-form.tsx create mode 100644 app/src/frontend/pages/login.tsx diff --git a/app/src/frontend/layout.tsx b/app/src/frontend/layout.tsx index 042a701..973e9f5 100644 --- a/app/src/frontend/layout.tsx +++ b/app/src/frontend/layout.tsx @@ -1,20 +1,23 @@ -import { FC } from 'hono/jsx'; -import Header from './layout/header'; -import Footer from './layout/footer'; +import { html } from 'hono/html'; -const Layout: FC = (props) => { - return ( +export const Layout = (props: { title: string, children?: any }) => { + return html` - {props.siteData.title} + + + + ${props.title} -
- {props.children} -