diff --git a/app/(home-pages)/home/HomeLayout.tsx b/app/(home-pages)/home/HomeLayout.tsx index 24766ade..4ab12a44 100644 --- a/app/(home-pages)/home/HomeLayout.tsx +++ b/app/(home-pages)/home/HomeLayout.tsx @@ -134,7 +134,8 @@ export function HomeLeafletList(props: { ...identity.permission_token_on_homepage.reduce( (acc, tok) => { let title = - tok.permission_tokens.leaflets_in_publications[0]?.title; + tok.permission_tokens.leaflets_in_publications[0]?.title || + tok.permission_tokens.leaflets_to_documents[0]?.title; if (title) acc[tok.permission_tokens.root_entity] = title; return acc; }, diff --git a/app/(home-pages)/home/page.tsx b/app/(home-pages)/home/page.tsx index 32c8fd95..5408ab37 100644 --- a/app/(home-pages)/home/page.tsx +++ b/app/(home-pages)/home/page.tsx @@ -29,7 +29,8 @@ export default async function Home() { ...auth_res?.permission_token_on_homepage.reduce( (acc, tok) => { let title = - tok.permission_tokens.leaflets_in_publications[0]?.title; + tok.permission_tokens.leaflets_in_publications[0]?.title || + tok.permission_tokens.leaflets_to_documents[0]?.title; if (title) acc[tok.permission_tokens.root_entity] = title; return acc; }, diff --git a/app/(home-pages)/looseleafs/LooseleafsLayout.tsx b/app/(home-pages)/looseleafs/LooseleafsLayout.tsx index 1568d8f8..d40d28d4 100644 --- a/app/(home-pages)/looseleafs/LooseleafsLayout.tsx +++ b/app/(home-pages)/looseleafs/LooseleafsLayout.tsx @@ -78,7 +78,8 @@ export const LooseleafList = (props: { ...identity.permission_token_on_homepage.reduce( (acc, tok) => { let title = - tok.permission_tokens.leaflets_in_publications[0]?.title; + tok.permission_tokens.leaflets_in_publications[0]?.title || + tok.permission_tokens.leaflets_to_documents[0]?.title; if (title) acc[tok.permission_tokens.root_entity] = title; return acc; }, diff --git a/app/(home-pages)/looseleafs/page.tsx b/app/(home-pages)/looseleafs/page.tsx index 4c687af7..9ae9f7b3 100644 --- a/app/(home-pages)/looseleafs/page.tsx +++ b/app/(home-pages)/looseleafs/page.tsx @@ -33,7 +33,8 @@ export default async function Home() { ...auth_res?.permission_token_on_homepage.reduce( (acc, tok) => { let title = - tok.permission_tokens.leaflets_in_publications[0]?.title; + tok.permission_tokens.leaflets_in_publications[0]?.title || + tok.permission_tokens.leaflets_to_documents[0]?.title; if (title) acc[tok.permission_tokens.root_entity] = title; return acc; },