设置 Web 页面标题
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useCallback, type ComponentType, type ReactNode } from "react"
|
||||
import { useCallback, useEffect, type ComponentType, type ReactNode } from "react"
|
||||
import {
|
||||
Bot,
|
||||
BookOpenText,
|
||||
@@ -99,6 +99,10 @@ export function SettingsShell({ children }: SettingsShellProps) {
|
||||
const router = useRouter()
|
||||
const normalizedPathname = normalizePath(pathname)
|
||||
|
||||
useEffect(() => {
|
||||
document.title = `${t("title")} - codeg`
|
||||
}, [t])
|
||||
|
||||
const navigateTo = useCallback(
|
||||
(href: string) => {
|
||||
if (typeof window === "undefined") return
|
||||
|
||||
Reference in New Issue
Block a user