diff --git a/apps/editor/components/app-home-link.tsx b/apps/editor/components/app-home-link.tsx new file mode 100644 index 0000000000..c7e83f677e --- /dev/null +++ b/apps/editor/components/app-home-link.tsx @@ -0,0 +1,19 @@ +'use client' + +import { usePascalI18n } from '@pascal-app/core' +import Link from 'next/link' +import type { ReactNode } from 'react' + +/** Server pages render `AppHeader`, so the translated link label lives in this client leaf. */ +export function AppHomeLink({ children }: { children: ReactNode }) { + const i18n = usePascalI18n() + return ( + + {children} + + ) +} diff --git a/apps/editor/components/app-shell.tsx b/apps/editor/components/app-shell.tsx index d0124fcdcf..9173677f55 100644 --- a/apps/editor/components/app-shell.tsx +++ b/apps/editor/components/app-shell.tsx @@ -1,7 +1,7 @@ import Image from 'next/image' -import Link from 'next/link' import type { ReactNode } from 'react' import { cn } from '@/lib/utils' +import { AppHomeLink } from './app-home-link' /** * The dark chrome every page outside the editor shares, so the scenes list, @@ -49,13 +49,9 @@ export function AppHeader({ children }: { children?: ReactNode }) { return (
- + - +
{children}
diff --git a/apps/editor/components/editor-navbar.tsx b/apps/editor/components/editor-navbar.tsx index d9777f20a3..bbededb983 100644 --- a/apps/editor/components/editor-navbar.tsx +++ b/apps/editor/components/editor-navbar.tsx @@ -1,5 +1,6 @@ 'use client' +import { usePascalI18n } from '@pascal-app/core' import { useEditor } from '@pascal-app/editor' import { Eye, Pencil, Share2 } from 'lucide-react' import Link from 'next/link' @@ -15,6 +16,7 @@ interface EditorNavbarProps { } export function EditorNavbar({ sceneId, name, onRename }: EditorNavbarProps) { + const i18n = usePascalI18n() const [editing, setEditing] = useState(false) const [shareOpen, setShareOpen] = useState(false) const shareAnchorRef = useRef(null) @@ -60,10 +62,10 @@ export function EditorNavbar({ sceneId, name, onRename }: EditorNavbarProps) {