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