diff --git a/messages/en.json b/messages/en.json index 86de1f6..c485c97 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1,7 +1,8 @@ { "Common": { "login": "Log in", - "signUp": "Sign up" + "logout": "Log out", + "signUp": "Sign up" }, "HomePage": { "title": "next-intl example" diff --git a/messages/zh.json b/messages/zh.json index 362bb15..6de5f6b 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -1,6 +1,7 @@ { "Common": { "login": "登录", + "logout": "退出", "signUp": "注册" }, "HomePage": { @@ -105,7 +106,7 @@ } }, "pages": { - "title": "页面", + "title": "演示页面", "items": { "about": { "title": "关于我们", diff --git a/src/components/blog/blog-category-list-mobile.tsx b/src/components/blog/blog-category-list-mobile.tsx index 5da9aa8..5c97ee3 100644 --- a/src/components/blog/blog-category-list-mobile.tsx +++ b/src/components/blog/blog-category-list-mobile.tsx @@ -37,7 +37,7 @@ export function BlogCategoryListMobile({ setOpen(true)} - className="flex items-center w-full p-3 border-y text-foreground/90" + className="flex items-center w-full p-4 border-y text-foreground/90" >
@@ -53,11 +53,7 @@ export function BlogCategoryListMobile({ {t("categories")} -
-
-
- -
    +
      ) { const [open, setOpen] = React.useState(false); const pathname = usePathname(); + const { data: session, error } = authClient.useSession(); + const user = session?.user; React.useEffect(() => { const handleRouteChangeStart = () => { @@ -71,7 +74,9 @@ export function NavbarMobile({ {/* navbar right shows menu icon */}
      - + {/* show user button if user is logged in */} + {user ? : null} +
    @@ -154,7 +156,6 @@ export function UserButton() { {avatarLinks.map((item) => ( { if (item.href) { @@ -180,7 +181,7 @@ export function UserButton() { >
    -

    Log out

    +

    {commonTranslations("logout")}