grain.social is a photo sharing platform built on atproto.

add link to bluesky profile on profile page

+13 -1
+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 - import { galleryLink, profileLink } from "../utils.ts"; 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 + <p> 42 + <a 43 + href={bskyProfileLink(profile.handle)} 44 + class="text-xs hover:underline" 45 + > 46 + <i class="fa-brands fa-bluesky text-sky-500" /> @{profile.handle} 47 + </a> 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 + export function bskyProfileLink(handle: string) { 48 + return `https://bsky.app/profile/${handle}`; 49 + } 50 + 47 51 export async function onSignedIn({ actor, ctx }: onSignedInArgs) { 48 52 const profileResults = ctx.indexService.getRecords<Profile>( 49 53 "social.grain.actor.profile",