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
29
return [...localComments, ...props.comments];
30
30
}, [props.comments, localComments]);
31
31
let pathname = usePathname();
32
32
+
let redirectRoute = useMemo(() => {
33
33
+
let url = new URL(pathname, window.location.origin);
34
34
+
url.searchParams.set("refreshAuth", "");
35
35
+
url.searchParams.set("interactionDrawer", "comments");
36
36
+
url.hash = "commentsDrawer";
37
37
+
return url.toString();
38
38
+
}, []);
32
39
33
40
return (
34
41
<div id={"commentsDrawer"} className="flex flex-col gap-2 relative">
···
46
53
) : (
47
54
<div className="w-full accent-container text-tertiary text-center italic p-3 flex flex-col gap-2">
48
55
Connect a Bluesky account to comment
49
49
-
<BlueskyLogin
50
50
-
redirectRoute={
51
51
-
pathname + "?interactionDrawer=comments#commentsDrawer"
52
52
-
}
53
53
-
/>
56
56
+
<BlueskyLogin redirectRoute={redirectRoute} />
54
57
</div>
55
58
)}
56
59
<hr className="border-border-light" />