Add share button for public feeds
This commit is contained in:
@@ -221,9 +221,26 @@ export function DashboardPage() {
|
|||||||
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" />
|
<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>
|
</Button>
|
||||||
|
)}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user