feat(web): i18n (#12471)

This commit is contained in:
Adam
2026-02-06 08:54:51 -06:00
committed by GitHub
parent 0ec5f6608b
commit 812597bb8b
75 changed files with 9868 additions and 726 deletions

View File

@@ -2,6 +2,7 @@ import { action } from "@solidjs/router"
import { getRequestEvent } from "solid-js/web"
import { useAuthSession } from "~/context/auth"
import { Dropdown } from "~/component/dropdown"
import { useI18n } from "~/context/i18n"
import "./user-menu.css"
const logout = action(async () => {
@@ -20,11 +21,12 @@ const logout = action(async () => {
}, "auth.logout")
export function UserMenu(props: { email: string | null | undefined }) {
const i18n = useI18n()
return (
<div data-component="user-menu">
<Dropdown trigger={props.email ?? ""} align="right">
<a href="/auth/logout" data-slot="item">
Logout
{i18n.t("user.logout")}
</a>
</Dropdown>
</div>