diff --git a/app/(home-pages)/home/HomeLayout.tsx b/app/(home-pages)/home/HomeLayout.tsx index 7ba4b9b6..c8f834c4 100644 --- a/app/(home-pages)/home/HomeLayout.tsx +++ b/app/(home-pages)/home/HomeLayout.tsx @@ -18,6 +18,7 @@ import { DashboardLayout, DashboardState, useDashboardState, + PageTitle, } from "components/PageLayouts/DashboardLayout"; import { Actions } from "./Actions/Actions"; import { GetLeafletDataReturnType } from "app/api/rpc/[command]/get_leaflet_data"; @@ -28,6 +29,12 @@ import { HomeEmptyState, PublicationBanner, } from "./HomeEmpty/HomeEmpty"; +import { Popover } from "components/Popover"; +import { PubIcon, PublicationButtons } from "components/ActionBar/Publications"; +import { normalizePublicationRecord } from "src/utils/normalizeRecords"; +import { ButtonPrimary } from "components/Buttons"; +import { LooseLeafSmall } from "components/Icons/LooseleafSmall"; +import { HomeButton } from "components/ActionBar/NavigationButtons"; export type Leaflet = { added_at: string; @@ -76,6 +83,43 @@ export const HomeLayout = (props: { (leaflet) => leaflet.archived === true, ).length > 0; + function getPubIcons() { + let hasLooseleafs = !!identity?.permission_token_on_homepage.find( + (f) => + f.permission_tokens.leaflets_to_documents && + f.permission_tokens.leaflets_to_documents[0]?.document, + ); + + if (identity && identity.publications.length >= 1) { + return ( +