diff options
author | Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com> | 2024-11-22 02:40:19 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 21:10:19 +0000 |
commit | f67e00a85c61ae8be65afda3fe75e7eaac1c2ffa (patch) | |
tree | b33b93ea57eabe13bb4910c8df07c3ce2cc7141f /bskyembed | |
parent | 48cda1350e877a43fa42923a75e02e1f0e5b0e1c (diff) | |
download | voidsky-f67e00a85c61ae8be65afda3fe75e7eaac1c2ffa.tar.zst |
fix: reused getRkey function in embed component (#6591)
Diffstat (limited to 'bskyembed')
-rw-r--r-- | bskyembed/src/components/embed.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bskyembed/src/components/embed.tsx b/bskyembed/src/components/embed.tsx index 82c3fd60a..e96acb89e 100644 --- a/bskyembed/src/components/embed.tsx +++ b/bskyembed/src/components/embed.tsx @@ -9,7 +9,6 @@ import { AppBskyGraphDefs, AppBskyGraphStarterpack, AppBskyLabelerDefs, - AtUri, } from '@atproto/api' import {ComponentChildren, h} from 'preact' import {useMemo} from 'preact/hooks' @@ -437,14 +436,14 @@ function StarterPackEmbed({ // from #/lib/strings/starter-pack.ts function getStarterPackImage(starterPack: AppBskyGraphDefs.StarterPackView) { - const rkey = new AtUri(starterPack.uri).rkey + const rkey = getRkey(starterPack.uri) return `https://ogcard.cdn.bsky.app/start/${starterPack.creator.did}/${rkey}` } function getStarterPackHref( starterPack: AppBskyGraphDefs.StarterPackViewBasic, ) { - const rkey = new AtUri(starterPack.uri).rkey + const rkey = getRkey(starterPack.uri) const handleOrDid = starterPack.creator.handle || starterPack.creator.did return `/starter-pack/${handleOrDid}/${rkey}` } |