fix: text compose papercuts (#270)
* make fixes * cleanup
This commit was merged in pull request #270.
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user