From 996aa5e21195cdad6e6365566b3f6db31ade43df Mon Sep 17 00:00:00 2001 From: Julien Herr Date: Fri, 22 May 2026 13:17:24 +0200 Subject: [PATCH] refactor(admin): migrate ui.ts to ui.tsx with JSX Layout component Replace hono/html tagged template layout() function with a typed JSX component. CSS and interactive scripts are injected via dangerouslySetInnerHTML to preserve exact output. clampText() is preserved and re-exported for consumers. Co-Authored-By: Claude Sonnet 4.6 --- src/routes/admin/{ui.ts => ui.tsx} | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) rename src/routes/admin/{ui.ts => ui.tsx} (57%) diff --git a/src/routes/admin/ui.ts b/src/routes/admin/ui.tsx similarity index 57% rename from src/routes/admin/ui.ts rename to src/routes/admin/ui.tsx index fed431d..d7d7533 100644 --- a/src/routes/admin/ui.ts +++ b/src/routes/admin/ui.tsx @@ -1,29 +1,29 @@ -import { html, raw } from "hono/html"; import { designSystem } from "../../styles/index"; import { interactiveScripts } from "../../scripts/index"; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const layout = (title: string, content: any) => { - return html` +type LayoutProps = { + title: string; + children: unknown; +}; + +export const Layout = ({ title, children }: LayoutProps) => { + return ( - ${title} - Email to RSS Admin + {title} - Email to RSS Admin - - +