fix: Empty space where logo should be on shared docs with no branding

fix: Not using emoji fallback on shared links
This commit is contained in:
Tom Moor
2024-07-01 11:04:00 -04:00
parent d8e571d82d
commit 9dcb04b58a
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ function SharedSidebar({ rootNode, shareId }: Props) {
return ( return (
<Sidebar> <Sidebar>
{team && ( {team?.name && (
<SidebarButton <SidebarButton
title={team.name} title={team.name}
image={<TeamLogo model={team} size={32} alt={t("Logo")} />} image={<TeamLogo model={team} size={32} alt={t("Logo")} />}

View File

@@ -101,6 +101,8 @@ function DocumentLink(
(activeDocument?.id === node.id ? activeDocument.title : node.title) || (activeDocument?.id === node.id ? activeDocument.title : node.title) ||
t("Untitled"); t("Untitled");
const icon = node.icon ?? node.emoji;
return ( return (
<> <>
<SidebarLink <SidebarLink
@@ -112,7 +114,7 @@ function DocumentLink(
}} }}
expanded={hasChildDocuments && depth !== 0 ? expanded : undefined} expanded={hasChildDocuments && depth !== 0 ? expanded : undefined}
onDisclosureClick={handleDisclosureClick} onDisclosureClick={handleDisclosureClick}
icon={node.icon && <Icon value={node.icon} color={node.color} />} icon={icon && <Icon value={icon} color={node.color} />}
label={title} label={title}
depth={depth} depth={depth}
exact={false} exact={false}