Add share button for public feeds
This commit is contained in:
@@ -214,16 +214,33 @@ export function DashboardPage() {
|
||||
Feed ID:
|
||||
<code className="bg-muted px-1 py-0.5 rounded text-xs">{selectedFeed.id}</code>
|
||||
<Button
|
||||
size="icon"
|
||||
variant="ghost"
|
||||
className="h-5 w-5 p-1"
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(selectedFeed.id);
|
||||
toast.success("Feed ID copied to clipboard");
|
||||
}}
|
||||
>
|
||||
<Copy className="h-4 w-4" />
|
||||
</Button>
|
||||
size="icon"
|
||||
variant="ghost"
|
||||
className="h-5 w-5 p-1"
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(selectedFeed.id);
|
||||
toast.success("Feed ID copied to clipboard");
|
||||
}}
|
||||
title="Copy Feed ID"
|
||||
>
|
||||
<Copy className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
{selectedFeed.isPublic && (
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="text-xs ml-2"
|
||||
onClick={() => {
|
||||
const shareUrl = `${window.location.origin}/publicfeed/${selectedFeed.id}`;
|
||||
navigator.clipboard.writeText(shareUrl);
|
||||
toast.success("Public share link copied");
|
||||
}}
|
||||
>
|
||||
Share
|
||||
</Button>
|
||||
)}
|
||||
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
|
Reference in New Issue
Block a user