tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
fix imports and types
awarm.space
3 months ago
cc75e4e3
166a1977
+5
-6
3 changed files
expand all
collapse all
unified
split
app
(home-pages)
home
HomeLayout.tsx
LeafletList
LeafletInfo.tsx
LeafletOptions.tsx
+3
-1
app/(home-pages)/home/HomeLayout.tsx
···
235
235
title={props?.titles?.[leaflet.root_entity]}
236
236
archived={archived}
237
237
token={leaflet}
238
238
-
draftInPublication={!!leaflet.leaflets_in_publications?.length}
238
238
+
draftInPublication={
239
239
+
leaflet.leaflets_in_publications?.[0]?.publication
240
240
+
}
239
241
published={
240
242
!!leaflet.leaflets_in_publications?.find((l) => l.doc) ||
241
243
!!leaflet.leaflets_to_documents?.find((l) => !!l.documents)
+1
-4
app/(home-pages)/home/LeafletList/LeafletInfo.tsx
···
1
1
"use client";
2
2
import { PermissionToken, useEntity } from "src/replicache";
3
3
import { LeafletOptions } from "./LeafletOptions";
4
4
-
import Link from "next/link";
5
5
-
import { use, useState } from "react";
4
4
+
import { useState } from "react";
6
5
import { timeAgo } from "src/utils/timeAgo";
7
7
-
import { usePublishLink } from "components/ShareOptions";
8
8
-
import { Separator } from "components/Layout";
9
6
import { usePageTitle } from "components/utils/UpdateLeafletTitle";
10
7
11
8
export const LeafletInfo = (props: {
+1
-1
app/(home-pages)/home/LeafletList/LeafletOptions.tsx
···
17
17
deletePost,
18
18
unpublishPost,
19
19
} from "app/lish/[did]/[publication]/dashboard/deletePost";
20
20
-
import { ShareButton } from "components/ShareOptions";
21
20
import { ShareSmall } from "components/Icons/ShareSmall";
22
21
import { HideSmall } from "components/Icons/HideSmall";
23
22
import { hideDoc } from "../storage";
···
31
30
usePublicationData,
32
31
mutatePublicationData,
33
32
} from "app/lish/[did]/[publication]/dashboard/PublicationSWRProvider";
33
33
+
import { ShareButton } from "app/[leaflet_id]/actions/ShareOptions";
34
34
35
35
export const LeafletOptions = (props: {
36
36
leaflet: PermissionToken;