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
add proper route to redirect on pub login in comments
awarm.space
6 months ago
308eb886
de50bde6
+8
-5
1 changed file
expand all
collapse all
unified
split
app
lish
[did]
[publication]
[rkey]
Interactions
Comments
index.tsx
+8
-5
app/lish/[did]/[publication]/[rkey]/Interactions/Comments/index.tsx
···
29
return [...localComments, ...props.comments];
30
}, [props.comments, localComments]);
31
let pathname = usePathname();
0
0
0
0
0
0
0
32
33
return (
34
<div id={"commentsDrawer"} className="flex flex-col gap-2 relative">
···
46
) : (
47
<div className="w-full accent-container text-tertiary text-center italic p-3 flex flex-col gap-2">
48
Connect a Bluesky account to comment
49
-
<BlueskyLogin
50
-
redirectRoute={
51
-
pathname + "?interactionDrawer=comments#commentsDrawer"
52
-
}
53
-
/>
54
</div>
55
)}
56
<hr className="border-border-light" />
···
29
return [...localComments, ...props.comments];
30
}, [props.comments, localComments]);
31
let pathname = usePathname();
32
+
let redirectRoute = useMemo(() => {
33
+
let url = new URL(pathname, window.location.origin);
34
+
url.searchParams.set("refreshAuth", "");
35
+
url.searchParams.set("interactionDrawer", "comments");
36
+
url.hash = "commentsDrawer";
37
+
return url.toString();
38
+
}, []);
39
40
return (
41
<div id={"commentsDrawer"} className="flex flex-col gap-2 relative">
···
53
) : (
54
<div className="w-full accent-container text-tertiary text-center italic p-3 flex flex-col gap-2">
55
Connect a Bluesky account to comment
56
+
<BlueskyLogin redirectRoute={redirectRoute} />
0
0
0
0
57
</div>
58
)}
59
<hr className="border-border-light" />