Add share button for public feeds
This commit is contained in:
@@ -214,16 +214,33 @@ export function DashboardPage() {
|
|||||||
Feed ID:
|
Feed ID:
|
||||||
<code className="bg-muted px-1 py-0.5 rounded text-xs">{selectedFeed.id}</code>
|
<code className="bg-muted px-1 py-0.5 rounded text-xs">{selectedFeed.id}</code>
|
||||||
<Button
|
<Button
|
||||||
size="icon"
|
size="icon"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="h-5 w-5 p-1"
|
className="h-5 w-5 p-1"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigator.clipboard.writeText(selectedFeed.id);
|
navigator.clipboard.writeText(selectedFeed.id);
|
||||||
toast.success("Feed ID copied to clipboard");
|
toast.success("Feed ID copied to clipboard");
|
||||||
}}
|
}}
|
||||||
>
|
title="Copy Feed ID"
|
||||||
<Copy className="h-4 w-4" />
|
>
|
||||||
</Button>
|
<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>
|
</span>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
Reference in New Issue
Block a user