mirror of
https://github.com/docmost/docmost.git
synced 2026-05-16 22:41:30 +08:00
refactor(backlinks): nest space details its own object
This commit is contained in:
@@ -71,9 +71,9 @@ export function BacklinksList({
|
||||
key={item.id}
|
||||
component={Link}
|
||||
to={
|
||||
item.spaceSlug
|
||||
item.space?.slug
|
||||
? buildPageUrl(
|
||||
item.spaceSlug,
|
||||
item.space.slug,
|
||||
item.slugId,
|
||||
item.title ?? undefined,
|
||||
)
|
||||
@@ -88,9 +88,9 @@ export function BacklinksList({
|
||||
<Text size="sm" fw={500} lineClamp={1}>
|
||||
{item.title || t("Untitled")}
|
||||
</Text>
|
||||
{item.spaceName && (
|
||||
{item.space?.name && (
|
||||
<Text size="xs" c="dimmed" lineClamp={1}>
|
||||
{item.spaceName}
|
||||
{item.space.name}
|
||||
</Text>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
@@ -11,8 +11,7 @@ export interface IBacklinkPageItem {
|
||||
title: string | null;
|
||||
icon: string | null;
|
||||
spaceId: string;
|
||||
spaceSlug: string | null;
|
||||
spaceName: string | null;
|
||||
space: { id: string; slug: string; name: string } | null;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user