fix: text compose papercuts (#270)

* make fixes

* cleanup
This commit was merged in pull request #270.
This commit is contained in:
Arjun Patel
2026-06-11 12:08:34 -07:00
committed by GitHub
parent 66d53497c5
commit ca3bbf204e
12 changed files with 220 additions and 60 deletions
@@ -1,5 +1,5 @@
import { Copy, ExternalLink, Globe } from 'lucide-react';
import type { LinkMetadata } from '@/lib/link-metadata';
import { domainFromUrl, type LinkMetadata } from '@/lib/link-metadata';
import { Skeleton } from '@/components/ui/skeleton';
import { Button } from '@/components/ui/button';
import { platform } from '@/lib/platform';
@@ -93,6 +93,22 @@ export function LinkPreviewCard({ metadata, compact }: LinkPreviewCardProps) {
);
}
/** Shown when metadata couldn't be fetched — the link itself still works. */
export function LinkPreviewCardFallback({ url }: { url: string }) {
return (
<LinkPreviewCard
metadata={{
url,
domain: domainFromUrl(url),
title: url,
description: null,
image: null,
favicon: null,
}}
/>
);
}
export function LinkPreviewCardSkeleton() {
return (
<div className="max-w-sm overflow-hidden rounded-2xl bg-white/10 backdrop-blur-md">