about summary refs log tree commit diff
path: root/src/view/com/composer/useExternalLinkFetch.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-06-02 15:01:04 -0500
committerGitHub <noreply@github.com>2023-06-02 15:01:04 -0500
commite8843ded5bf1f3d97b735ffe8f8553de46f9b18b (patch)
tree9c94613890fdc5428875dede148a5dd48e1c21a3 /src/view/com/composer/useExternalLinkFetch.ts
parent46c9de7c1865a57d2fef926db2d923a8687eca18 (diff)
downloadvoidsky-e8843ded5bf1f3d97b735ffe8f8553de46f9b18b.tar.zst
Fix a bunch of type errors and add a type-check to the github workflows (#837)
* Add yarn type-check

* Rename to yarn typecheck

* Fix a collection of type errors

* Add typecheck to automated tests

* add `dist` to exluded folders tsconfig

---------

Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/com/composer/useExternalLinkFetch.ts')
-rw-r--r--src/view/com/composer/useExternalLinkFetch.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/com/composer/useExternalLinkFetch.ts b/src/view/com/composer/useExternalLinkFetch.ts
index 8d3b8cac2..91f4da059 100644
--- a/src/view/com/composer/useExternalLinkFetch.ts
+++ b/src/view/com/composer/useExternalLinkFetch.ts
@@ -1,5 +1,6 @@
 import {useState, useEffect} from 'react'
 import {useStores} from 'state/index'
+import {ImageModel} from 'state/models/media/image'
 import * as apilib from 'lib/api/index'
 import {getLinkMeta} from 'lib/link-meta/link-meta'
 import {getPostAsQuote, getFeedAsEmbed} from 'lib/link-meta/bsky'
@@ -90,7 +91,9 @@ export function useExternalLinkFetch({
           setExtLink({
             ...extLink,
             isLoading: false, // done
-            localThumb,
+            localThumb: localThumb
+              ? new ImageModel(store, localThumb)
+              : undefined,
           })
         })
       return cleanup