tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
a tool for shared writing and social publishing
284
fork
atom
overview
issues
27
pulls
pipelines
stray console log eradication
cozylittle.house
1 week ago
beb1cdb1
b2055eb4
+3
-12
8 changed files
expand all
collapse all
unified
split
app
(home-pages)
p
[didOrHandle]
ProfileHeader.tsx
[leaflet_id]
publish
BskyPostEditorProsemirror.tsx
lish
[did]
[publication]
[rkey]
ThreadPage.tsx
dashboard
PublicationSWRProvider.tsx
components
ActionBar
NavigationButtons.tsx
Blocks
BaseTextareaBlock.tsx
Tags.tsx
src
replicache
mutations.ts
-2
app/(home-pages)/p/[didOrHandle]/ProfileHeader.tsx
···
42
42
@{props.profile.handle}
43
43
</div>
44
44
);
45
45
-
console.log(props.profile);
46
46
-
47
45
return (
48
46
<div
49
47
className={`profileHeader flex flex-col relative `}
-2
app/[leaflet_id]/publish/BskyPostEditorProsemirror.tsx
···
410
410
range: { from: number; to: number },
411
411
view: EditorView,
412
412
) => {
413
413
-
console.log("view", view);
414
413
if (!view) return;
415
414
const { from, to } = range;
416
415
const tr = view.state.tr;
···
437
436
});
438
437
tr.insert(from, atMentionNode);
439
438
}
440
440
-
console.log("yo", mention);
441
439
442
440
// Add a space after the mention
443
441
tr.insertText(" ", from + 1);
-1
app/lish/[did]/[publication]/[rkey]/ThreadPage.tsx
···
298
298
e.stopPropagation();
299
299
300
300
props.toggleCollapsed(parentPostUri);
301
301
-
console.log("reply clicked");
302
301
}}
303
302
/>
304
303
</>
+3
-3
app/lish/[did]/[publication]/dashboard/PublicationSWRProvider.tsx
···
12
12
13
13
// Derive all types from the RPC return type
14
14
export type PublicationData = GetPublicationDataReturnType["result"];
15
15
-
export type PublishedDocument = NonNullable<PublicationData>["documents"][number];
15
15
+
export type PublishedDocument =
16
16
+
NonNullable<PublicationData>["documents"][number];
16
17
export type PublicationDraft = NonNullable<PublicationData>["drafts"][number];
17
18
18
19
const PublicationContext = createContext({ name: "", did: "" });
···
24
25
}) {
25
26
let key = `publication-data-${props.publication_did}-${props.publication_rkey}`;
26
27
useEffect(() => {
27
27
-
console.log("UPDATING");
28
28
mutate(key, props.publication_data);
29
29
}, [props.publication_data]);
30
30
return (
···
64
64
const { data } = usePublicationData();
65
65
return useMemo(
66
66
() => normalizePublicationRecord(data?.publication?.record),
67
67
-
[data?.publication?.record]
67
67
+
[data?.publication?.record],
68
68
);
69
69
}
70
70
-1
components/ActionBar/NavigationButtons.tsx
···
41
41
currentPubUri?: string;
42
42
compactOnMobile?: boolean;
43
43
}) => {
44
44
-
console.log(props.currentPage);
45
44
let current =
46
45
props.currentPage === "home" ||
47
46
props.currentPage === "looseleafs" ||
-1
components/Blocks/BaseTextareaBlock.tsx
···
83
83
let block = props.block.nextBlock;
84
84
85
85
let coord = getCoordinatesInTextarea(e.currentTarget, selection);
86
86
-
console.log(coord);
87
86
if (block) {
88
87
focusBlock(block, {
89
88
left: coord.left + e.currentTarget.getBoundingClientRect().left,
-1
components/Tags.tsx
···
109
109
}
110
110
111
111
function selectTag(tag: string) {
112
112
-
console.log("selected " + tag);
113
112
props.setSelectedTags([...props.selectedTags, tag]);
114
113
clearTagInput();
115
114
}
-1
src/replicache/mutations.ts
···
661
661
localPublishedAt?: string | null;
662
662
}> = async (args, ctx) => {
663
663
await ctx.runOnServer(async (serverCtx) => {
664
664
-
console.log("updating");
665
664
const updates: {
666
665
description?: string;
667
666
title?: string;