Skip to content

Commit

Permalink
chore(deps): update @elysiajs/html to version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed Oct 18, 2024
1 parent 5fe0b79 commit e8ed10d
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion src/components/base.tsx
Original file line number Diff line number Diff line change
@@ -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;
}) => (
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
19 changes: 14 additions & 5 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -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 = (
Expand All @@ -12,7 +17,8 @@ export const Header = ({
text-accent-600 transition-all
hover:text-accent-500 hover:underline
`}
href="/history">
href="/history"
>
History
</a>
</li>
Expand All @@ -22,7 +28,8 @@ export const Header = ({
text-accent-600 transition-all
hover:text-accent-500 hover:underline
`}
href="/logoff">
href="/logoff"
>
Logout
</a>
</li>
Expand All @@ -37,7 +44,8 @@ export const Header = ({
text-accent-600 transition-all
hover:text-accent-500 hover:underline
`}
href="/login">
href="/login"
>
Login
</a>
</li>
Expand All @@ -48,7 +56,8 @@ export const Header = ({
text-accent-600 transition-all
hover:text-accent-500 hover:underline
`}
href="/register">
href="/register"
>
Register
</a>
</li>
Expand Down
14 changes: 13 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -131,6 +131,18 @@ const app = new Elysia({
prefix: "/",
}),
)
.get("/test", () => {
return (
<html lang="en">
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
);
})
.get("/setup", ({ redirect }) => {
if (!FIRST_RUN) {
return redirect("/login", 302);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
"noImplicitOverride": true
// "noImplicitReturns": true
}
}
}

0 comments on commit e8ed10d

Please sign in to comment.