my fork of the bluesky client

fix: reused getRkey function in embed component (#6591)

authored by

Aditya Mathur and committed by
GitHub
f67e00a8 48cda135

+2 -3
+2 -3
bskyembed/src/components/embed.tsx
··· 9 9 AppBskyGraphDefs, 10 10 AppBskyGraphStarterpack, 11 11 AppBskyLabelerDefs, 12 - AtUri, 13 12 } from '@atproto/api' 14 13 import {ComponentChildren, h} from 'preact' 15 14 import {useMemo} from 'preact/hooks' ··· 437 436 438 437 // from #/lib/strings/starter-pack.ts 439 438 function getStarterPackImage(starterPack: AppBskyGraphDefs.StarterPackView) { 440 - const rkey = new AtUri(starterPack.uri).rkey 439 + const rkey = getRkey(starterPack.uri) 441 440 return `https://ogcard.cdn.bsky.app/start/${starterPack.creator.did}/${rkey}` 442 441 } 443 442 444 443 function getStarterPackHref( 445 444 starterPack: AppBskyGraphDefs.StarterPackViewBasic, 446 445 ) { 447 - const rkey = new AtUri(starterPack.uri).rkey 446 + const rkey = getRkey(starterPack.uri) 448 447 const handleOrDid = starterPack.creator.handle || starterPack.creator.did 449 448 return `/starter-pack/${handleOrDid}/${rkey}` 450 449 }