diff --git a/bun.lockb b/bun.lockb index dc0b6f8..171ff68 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 69454e4..3a08d44 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@elysiajs/cookie": "^0.8.0", - "@elysiajs/html": "1.0.2", + "@elysiajs/html": "^1.1.1", "@elysiajs/jwt": "^1.1.1", "@elysiajs/static": "1.0.3", "elysia": "^1.1.22" diff --git a/src/components/base.tsx b/src/components/base.tsx index 0f121af..9c29dc0 100644 --- a/src/components/base.tsx +++ b/src/components/base.tsx @@ -1,7 +1,12 @@ +import { Html } from "@elysiajs/html"; + export const BaseHtml = ({ children, title = "ConvertX", -}: { children: JSX.Element; title?: string }) => ( +}: { + children: JSX.Element; + title?: string; +}) => (
diff --git a/src/components/header.tsx b/src/components/header.tsx index 5526d89..6e96e58 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -1,7 +1,12 @@ +import { Html } from "@kitajs/html"; + export const Header = ({ loggedIn, accountRegistration, -}: { loggedIn?: boolean; accountRegistration?: boolean }) => { +}: { + loggedIn?: boolean; + accountRegistration?: boolean; +}) => { let rightNav: JSX.Element; if (loggedIn) { rightNav = ( @@ -12,7 +17,8 @@ export const Header = ({ text-accent-600 transition-all hover:text-accent-500 hover:underline `} - href="/history"> + href="/history" + > History @@ -22,7 +28,8 @@ export const Header = ({ text-accent-600 transition-all hover:text-accent-500 hover:underline `} - href="/logoff"> + href="/logoff" + > Logout @@ -37,7 +44,8 @@ export const Header = ({ text-accent-600 transition-all hover:text-accent-500 hover:underline `} - href="/login"> + href="/login" + > Login @@ -48,7 +56,8 @@ export const Header = ({ text-accent-600 transition-all hover:text-accent-500 hover:underline `} - href="/register"> + href="/register" + > Register diff --git a/src/index.tsx b/src/index.tsx index 6191690..bd5761c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2,7 +2,7 @@ import { randomInt, randomUUID } from "node:crypto"; import { rmSync } from "node:fs"; import { mkdir, unlink } from "node:fs/promises"; import cookie from "@elysiajs/cookie"; -import { html } from "@elysiajs/html"; +import { html, Html } from "@elysiajs/html"; import { jwt, type JWTPayloadSpec } from "@elysiajs/jwt"; import { staticPlugin } from "@elysiajs/static"; import { Database } from "bun:sqlite"; @@ -131,6 +131,18 @@ const app = new Elysia({ prefix: "/", }), ) + .get("/test", () => { + return ( + + +