[nexus] fix(03-05): replace remaining Paperclip/Companies display strings in BreadcrumbContext and CompanySwitcher
This commit is contained in:
parent
509b73d8fc
commit
49365d0729
2 changed files with 6 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ export function CompanySwitcher() {
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start" className="w-[220px]">
|
||||
<DropdownMenuLabel>Companies</DropdownMenuLabel>
|
||||
<DropdownMenuLabel>{VOCAB.companies}</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
{sidebarCompanies.map((company) => (
|
||||
<DropdownMenuItem
|
||||
|
|
@ -61,7 +61,7 @@ export function CompanySwitcher() {
|
|||
</DropdownMenuItem>
|
||||
))}
|
||||
{sidebarCompanies.length === 0 && (
|
||||
<DropdownMenuItem disabled>No companies</DropdownMenuItem>
|
||||
<DropdownMenuItem disabled>{`No ${VOCAB.companies.toLowerCase()}`}</DropdownMenuItem>
|
||||
)}
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem asChild>
|
||||
|
|
@ -73,7 +73,7 @@ export function CompanySwitcher() {
|
|||
<DropdownMenuItem asChild>
|
||||
<Link to="/companies" className="no-underline text-inherit">
|
||||
<Plus className="h-4 w-4 mr-2" />
|
||||
Manage Companies
|
||||
{`Manage ${VOCAB.companies}`}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { createContext, useCallback, useContext, useEffect, useState, type ReactNode } from "react";
|
||||
import { VOCAB } from "@paperclipai/branding"; // [nexus]
|
||||
|
||||
export interface Breadcrumb {
|
||||
label: string;
|
||||
|
|
@ -21,10 +22,10 @@ export function BreadcrumbProvider({ children }: { children: ReactNode }) {
|
|||
|
||||
useEffect(() => {
|
||||
if (breadcrumbs.length === 0) {
|
||||
document.title = "Paperclip";
|
||||
document.title = VOCAB.appName; // [nexus]
|
||||
} else {
|
||||
const parts = [...breadcrumbs].reverse().map((b) => b.label);
|
||||
document.title = `${parts.join(" · ")} · Paperclip`;
|
||||
document.title = `${parts.join(" · ")} · ${VOCAB.appName}`; // [nexus]
|
||||
}
|
||||
}, [breadcrumbs]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue