tangled
alpha
login
or
join now
grain.social
/
grain
38
fork
atom
grain.social is a photo sharing platform built on atproto.
38
fork
atom
overview
issues
2
pulls
pipelines
add link to bluesky profile on profile page
chadtmiller.com
9 months ago
bcaae913
b4f4b86a
+13
-1
2 changed files
expand all
collapse all
unified
split
src
components
ProfilePage.tsx
utils.ts
+9
-1
src/components/ProfilePage.tsx
···
6
6
import { AtUri } from "@atproto/syntax";
7
7
import { Button, cn } from "@bigmoves/bff/components";
8
8
import { TimelineItem } from "../timeline.ts";
9
9
-
import { galleryLink, profileLink } from "../utils.ts";
9
9
+
import { bskyProfileLink, galleryLink, profileLink } from "../utils.ts";
10
10
import { AvatarButton } from "./AvatarButton.tsx";
11
11
import { FollowButton } from "./FollowButton.tsx";
12
12
import { TimelineItem as Item } from "./TimelineItem.tsx";
···
38
38
{profile.description
39
39
? <p class="mt-2">{profile.description}</p>
40
40
: null}
41
41
+
<p>
42
42
+
<a
43
43
+
href={bskyProfileLink(profile.handle)}
44
44
+
class="text-xs hover:underline"
45
45
+
>
46
46
+
<i class="fa-brands fa-bluesky text-sky-500" /> @{profile.handle}
47
47
+
</a>
48
48
+
</p>
41
49
</div>
42
50
{!isCreator && loggedInUserDid
43
51
? (
+4
src/utils.ts
···
44
44
return `${PUBLIC_URL}${galleryLink(handle, new AtUri(galleryUri).rkey)}`;
45
45
}
46
46
47
47
+
export function bskyProfileLink(handle: string) {
48
48
+
return `https://bsky.app/profile/${handle}`;
49
49
+
}
50
50
+
47
51
export async function onSignedIn({ actor, ctx }: onSignedInArgs) {
48
52
const profileResults = ctx.indexService.getRecords<Profile>(
49
53
"social.grain.actor.profile",