diff options
| author | Dhravya Shah <[email protected]> | 2025-03-17 15:18:40 -0700 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2025-03-17 15:18:40 -0700 |
| commit | 5582402a9f65698f0fe63de5bac18e8b09fa9e67 (patch) | |
| tree | 68946760e94ba40158a124987750cfa43545132e /apps/web/app/components | |
| parent | Minor cleanup and fix (diff) | |
| download | supermemory-5582402a9f65698f0fe63de5bac18e8b09fa9e67.tar.xz supermemory-5582402a9f65698f0fe63de5bac18e8b09fa9e67.zip | |
fix: tweets view
Diffstat (limited to 'apps/web/app/components')
| -rw-r--r-- | apps/web/app/components/memories/SharedCard.tsx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/web/app/components/memories/SharedCard.tsx b/apps/web/app/components/memories/SharedCard.tsx index 69283324..04ba769b 100644 --- a/apps/web/app/components/memories/SharedCard.tsx +++ b/apps/web/app/components/memories/SharedCard.tsx @@ -88,18 +88,24 @@ const renderContent = { return <CustomTwitterComp tweet={parsedData} />; } catch (error) { console.error("Error parsing raw tweet data:", error); - return <div className="p-4 text-muted-foreground">Error parsing tweet data</div>; + return ( + <div className="p-4 text-muted-foreground">Error parsing tweet data. {rawContent}</div> + ); } } // Otherwise use normal tweet ID flow - const tweetId = ourData.content?.match(/\/status\/(\d+)/)?.[1] ?? ourData.content; + const tweetId = ourData.url?.match(/\/status\/(\d+)/)?.[1] ?? ourData.url; const { data, error } = useTweet(tweetId ?? undefined); if (error) { console.error("Error parsing tweet:", error); console.log("Tweet ID:", tweetId); - return <div className="p-4 text-muted-foreground">Error parsing tweet</div>; + return ( + <div className="p-4 text-muted-foreground"> + Error parsing tweet. {tweetId} {JSON.stringify(error)} + </div> + ); } if (!data || typeof data == "undefined") { @@ -554,6 +560,7 @@ export function FetchAndRenderContent({ content }: { content: string }) { isSuccessfullyProcessed: true, errorMessage: null, contentHash: null, + metadata: null, }; setMemory(item); return; @@ -579,6 +586,7 @@ export function FetchAndRenderContent({ content }: { content: string }) { isSuccessfullyProcessed: true, errorMessage: null, contentHash: null, + metadata: null, }; setMemory(item); } catch (error) { @@ -599,6 +607,7 @@ export function FetchAndRenderContent({ content }: { content: string }) { isSuccessfullyProcessed: false, errorMessage: null, contentHash: null, + metadata: null, }; setMemory(item); } finally { @@ -824,11 +833,11 @@ export const SpaceSelector = function SpaceSelector({ if (!spacesData?.spaces) return []; return spacesData.spaces.filter( (space) => - space.name.toLowerCase().includes(search.toLowerCase()) && space.uuid !== (spaceId ? spaceId.split("---")[0] : "<HOME>"), + space.name.toLowerCase().includes(search.toLowerCase()) && + space.uuid !== (spaceId ? spaceId.split("---")[0] : "<HOME>"), ); }, [spacesData?.spaces, search]); - if (isLoading) { return ( <DropdownMenuSubContent> |