diff --git a/app/(home-pages)/home/HomeLayout.tsx b/app/(home-pages)/home/HomeLayout.tsx index bb932615..24766ade 100644 --- a/app/(home-pages)/home/HomeLayout.tsx +++ b/app/(home-pages)/home/HomeLayout.tsx @@ -235,7 +235,9 @@ export function LeafletList(props: { title={props?.titles?.[leaflet.root_entity]} archived={archived} token={leaflet} - draftInPublication={!!leaflet.leaflets_in_publications?.length} + draftInPublication={ + leaflet.leaflets_in_publications?.[0]?.publication + } published={ !!leaflet.leaflets_in_publications?.find((l) => l.doc) || !!leaflet.leaflets_to_documents?.find((l) => !!l.documents) diff --git a/app/(home-pages)/home/LeafletList/LeafletInfo.tsx b/app/(home-pages)/home/LeafletList/LeafletInfo.tsx index f974b758..20004a7c 100644 --- a/app/(home-pages)/home/LeafletList/LeafletInfo.tsx +++ b/app/(home-pages)/home/LeafletList/LeafletInfo.tsx @@ -1,11 +1,8 @@ "use client"; import { PermissionToken, useEntity } from "src/replicache"; import { LeafletOptions } from "./LeafletOptions"; -import Link from "next/link"; -import { use, useState } from "react"; +import { useState } from "react"; import { timeAgo } from "src/utils/timeAgo"; -import { usePublishLink } from "components/ShareOptions"; -import { Separator } from "components/Layout"; import { usePageTitle } from "components/utils/UpdateLeafletTitle"; export const LeafletInfo = (props: { diff --git a/app/(home-pages)/home/LeafletList/LeafletOptions.tsx b/app/(home-pages)/home/LeafletList/LeafletOptions.tsx index 891f49f0..efb6840e 100644 --- a/app/(home-pages)/home/LeafletList/LeafletOptions.tsx +++ b/app/(home-pages)/home/LeafletList/LeafletOptions.tsx @@ -17,7 +17,6 @@ import { deletePost, unpublishPost, } from "app/lish/[did]/[publication]/dashboard/deletePost"; -import { ShareButton } from "components/ShareOptions"; import { ShareSmall } from "components/Icons/ShareSmall"; import { HideSmall } from "components/Icons/HideSmall"; import { hideDoc } from "../storage"; @@ -31,6 +30,7 @@ import { usePublicationData, mutatePublicationData, } from "app/lish/[did]/[publication]/dashboard/PublicationSWRProvider"; +import { ShareButton } from "app/[leaflet_id]/actions/ShareOptions"; export const LeafletOptions = (props: { leaflet: PermissionToken;