From 30f24e137ee2d1acec11a0da61e134f512ee02dd Mon Sep 17 00:00:00 2001 From: yyamashita Date: Fri, 19 Jun 2026 15:18:55 +0900 Subject: Initial implementation of microblog Markdown-based personal microblog with REST API. XSS protection via sanitize-html on server-side markdown rendering. Co-Authored-By: Claude Sonnet 4.6 --- app/root.tsx | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 app/root.tsx (limited to 'app/root.tsx') diff --git a/app/root.tsx b/app/root.tsx new file mode 100644 index 0000000..80570db --- /dev/null +++ b/app/root.tsx @@ -0,0 +1,46 @@ +import { isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router"; +import type { Route } from "./+types/root"; +import "./app.css"; + +export function Layout({ children }: { children: React.ReactNode }) { + return ( + + + + + log + + + + + {children} + + + + + ); +} + +export default function App() { + return ; +} + +export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) { + let message = "Error"; + let details = "An unexpected error occurred."; + + if (isRouteErrorResponse(error)) { + message = String(error.status); + details = error.statusText || details; + } else if (import.meta.env.DEV && error instanceof Error) { + details = error.message; + } + + return ( +
+

+ {message}: {details} +

+
+ ); +} -- cgit v1.2.3