Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ToggleableLinkItem } from './ToggleableLinkItem';

export function PageDocumentItem(props: { page: ClientTOCPageDocument }) {
const { page } = props;
const title = page.sidebarTitle || page.title;

return (
<li className="flex flex-col">
Expand Down Expand Up @@ -41,10 +42,10 @@ export function PageDocumentItem(props: { page: ClientTOCPageDocument }) {
{page.emoji || page.icon ? (
<span className="flex items-center gap-3">
<TOCPageIcon page={page} />
{page.title}
{title}
</span>
) : (
page.title
title
)}
</ToggleableLinkItem>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type ClientTOCPageDocument = {
type: 'document';
id: string;
title: string;
sidebarTitle?: string;
href: string;
emoji?: string;
icon?: string;
Expand Down Expand Up @@ -73,6 +74,7 @@ export async function encodeClientTableOfContents(
removeUndefined({
id: page.id,
title: page.title,
sidebarTitle: page.sidebarTitle,
href,
emoji: page.emoji,
icon: page.icon,
Expand Down
Loading