about summary refs log tree commit diff
path: root/src/view/com/util/post-embeds/index.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-07-03 18:15:08 -0700
committerGitHub <noreply@github.com>2024-07-04 02:15:08 +0100
commitaa7117edb60711a67464f7559118334185f01680 (patch)
treeb0ccd3d7ef0d792613542a1af48c3fbae1f36f21 /src/view/com/util/post-embeds/index.tsx
parenta3d4fb652b888ba81aecbf0e81a954968ea65d39 (diff)
downloadvoidsky-aa7117edb60711a67464f7559118334185f01680.tar.zst
Add starter pack embeds to posts (#4699)
* starter pack embeds

* revert test code

* Types

* add `BaseLink`

* precache on click

* rm log

* add a comment

* loading state

* top margin

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/view/com/util/post-embeds/index.tsx')
-rw-r--r--src/view/com/util/post-embeds/index.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/view/com/util/post-embeds/index.tsx b/src/view/com/util/post-embeds/index.tsx
index be34a2869..942ad57b8 100644
--- a/src/view/com/util/post-embeds/index.tsx
+++ b/src/view/com/util/post-embeds/index.tsx
@@ -30,6 +30,7 @@ import {ListEmbed} from './ListEmbed'
 import {MaybeQuoteEmbed} from './QuoteEmbed'
 import hairlineWidth = StyleSheet.hairlineWidth
 import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge'
+import {Embed as StarterPackCard} from '#/components/StarterPack/StarterPackCard'
 
 type Embed =
   | AppBskyEmbedRecord.View
@@ -90,6 +91,10 @@ export function PostEmbeds({
       return <ListEmbed item={embed.record} />
     }
 
+    if (AppBskyGraphDefs.isStarterPackViewBasic(embed.record)) {
+      return <StarterPackCard starterPack={embed.record} />
+    }
+
     // quote post
     // =
     return (