[WEB-2338] chore: handle untitled page breadcrumbs (#5445)
* chore: handle untitle page titles * chore: store page title in a const
This commit is contained in:
parent
3ee14771e7
commit
0cce39ec7c
1 changed files with 4 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ import { BreadcrumbLink, Logo } from "@/components/common";
|
|||
import { PageEditInformationPopover } from "@/components/pages";
|
||||
// helpers
|
||||
import { convertHexEmojiToDecimal } from "@/helpers/emoji.helper";
|
||||
import { getPageName } from "@/helpers/page.helper";
|
||||
// hooks
|
||||
import { usePage, useProject } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
@ -58,6 +59,7 @@ export const PageDetailsHeader = observer(() => {
|
|||
}
|
||||
};
|
||||
|
||||
const pageTitle = getPageName(name);
|
||||
const isVersionHistoryOverlayActive = !!searchParams.get("version");
|
||||
|
||||
return (
|
||||
|
|
@ -148,9 +150,9 @@ export const PageDetailsHeader = observer(() => {
|
|||
}
|
||||
/>
|
||||
</div>
|
||||
<Tooltip tooltipContent={name ?? "Page"} position="bottom" isMobile={isMobile}>
|
||||
<Tooltip tooltipContent={pageTitle} position="bottom" isMobile={isMobile}>
|
||||
<div className="relative line-clamp-1 block max-w-[150px] overflow-hidden truncate">
|
||||
{name ?? "Page"}
|
||||
{pageTitle}
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue