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