diff --git a/components/calendar/calendar-app.tsx b/components/calendar/calendar-app.tsx index 4fe0a5c6d..cfbce5667 100644 --- a/components/calendar/calendar-app.tsx +++ b/components/calendar/calendar-app.tsx @@ -91,6 +91,7 @@ import { } from "@/lib/calendar-scroll-window"; import { useLiteLinkSegments } from "@/hooks/use-lite-link-segments"; import { findMeetingLink } from "@/lib/event-links"; +import { useDocumentTitle } from "@/hooks/use-document-title"; type PendingScopeAction = | { type: "edit"; event: CalendarEvent; updates: Partial; sendScheduling?: boolean } @@ -111,6 +112,8 @@ export function CalendarApp({ linkSegments: routeSegments }: CalendarAppProps = const linkSegments = useLiteLinkSegments('calendar', routeSegments); const router = useRouter(); const t = useTranslations("calendar"); + const tSidebar = useTranslations("sidebar"); + useDocumentTitle(tSidebar("calendar")); const tWebcalAction = useTranslations("calendar.webcal_action"); const tDeepLink = useTranslations("deep_link"); const isMobile = useIsMobile(); diff --git a/components/contacts/contacts-app.tsx b/components/contacts/contacts-app.tsx index 2a82490da..011a4afd0 100644 --- a/components/contacts/contacts-app.tsx +++ b/components/contacts/contacts-app.tsx @@ -43,6 +43,7 @@ import { consumePendingDeepLinkEntry, subscribePendingDeepLink } from "@/lib/dee import { useDeepLinkUrl } from "@/hooks/use-deep-link-url"; import { useProInterfaceActive } from "@/components/pro/pro-interface-redirect"; import { useLiteLinkSegments } from "@/hooks/use-lite-link-segments"; +import { useDocumentTitle } from "@/hooks/use-document-title"; type View = | "list" @@ -63,6 +64,8 @@ function ContactsAppContent({ linkSegments: routeSegments }: ContactsAppProps = // Static Lite build: the route params are empty, read the link from the URL. const linkSegments = useLiteLinkSegments('contacts', routeSegments); const t = useTranslations("contacts"); + const tSidebar = useTranslations("sidebar"); + useDocumentTitle(tSidebar("contacts")); const contactsEnabled = usePolicyStore((s) => s.isFeatureEnabled('contactsEnabled')); const { client, isAuthenticated, logout, checkAuth, isLoading: authLoading } = useAuthStore(); const { showAppsModal, inlineApp, loadedApps, handleManageApps, handleInlineApp, closeInlineApp, closeAppsModal } = useSidebarApps(); diff --git a/components/files/files-app.tsx b/components/files/files-app.tsx index 0a15510ec..3ea94c2eb 100644 --- a/components/files/files-app.tsx +++ b/components/files/files-app.tsx @@ -38,6 +38,7 @@ import { consumePendingDeepLinkEntry, subscribePendingDeepLink } from "@/lib/dee import { useDeepLinkUrl } from "@/hooks/use-deep-link-url"; import { useProInterfaceActive } from "@/components/pro/pro-interface-redirect"; import { useLiteLinkSegments } from "@/hooks/use-lite-link-segments"; +import { useDocumentTitle } from "@/hooks/use-document-title"; export interface FilesAppProps { /** Path segments after `/files` - the folder path, one segment per level. */ @@ -49,6 +50,8 @@ export function FilesApp({ linkSegments: routeSegments }: FilesAppProps = {}) { const linkSegments = useLiteLinkSegments('files', routeSegments); const router = useRouter(); const t = useTranslations("files"); + const tSidebar = useTranslations("sidebar"); + useDocumentTitle(tSidebar("files")); const tDeepLink = useTranslations("deep_link"); const filesEnabled = usePolicyStore((s) => s.isFeatureEnabled('filesEnabled')); const { isAuthenticated, logout, checkAuth, isLoading: authLoading, client } = useAuthStore(); diff --git a/components/settings/settings-app.tsx b/components/settings/settings-app.tsx index ceae16365..ed29a460c 100644 --- a/components/settings/settings-app.tsx +++ b/components/settings/settings-app.tsx @@ -102,6 +102,7 @@ import { tabSearchPaths, } from '@/lib/settings-search'; import { useLiteLinkSegments } from '@/hooks/use-lite-link-segments'; +import { useDocumentTitle } from '@/hooks/use-document-title'; type Tab = SettingsSearchTab; @@ -217,6 +218,7 @@ export function SettingsApp({ linkSegments: routeSegments }: SettingsAppProps = const router = useRouter(); const t = useTranslations('settings'); const tSidebar = useTranslations('sidebar'); + useDocumentTitle(tSidebar('settings')); const { client, isAuthenticated, logout, checkAuth, isLoading: authLoading } = useAuthStore(); const { showAppsModal, inlineApp, loadedApps, handleManageApps, handleInlineApp, closeInlineApp, closeAppsModal } = useSidebarApps(); const isEmbedded = useIsEmbedded();