From f67e00a85c61ae8be65afda3fe75e7eaac1c2ffa Mon Sep 17 00:00:00 2001 From: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:40:19 +0530 Subject: fix: reused getRkey function in embed component (#6591) --- bskyembed/src/components/embed.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bskyembed/src') 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}` } -- cgit 1.4.1