feat(www): locale specific urls (#12508)

This commit is contained in:
Adam
2026-02-06 11:30:40 -06:00
committed by GitHub
parent 8069197329
commit 24cd84cda5
33 changed files with 279 additions and 134 deletions

View File

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