Fix collection sharing/link copying using the local/relative collection URL (#38935)
This commit is contained in:
parent
11803e3d04
commit
9c8e1855a5
@ -131,7 +131,7 @@ export const CollectionMenu: React.FC<{
|
|||||||
{
|
{
|
||||||
text: intl.formatMessage(messages.copyLink),
|
text: intl.formatMessage(messages.copyLink),
|
||||||
action: () => {
|
action: () => {
|
||||||
void navigator.clipboard.writeText(getCollectionPath(id));
|
void navigator.clipboard.writeText(collection.url);
|
||||||
dispatch(showAlert({ message: messages.copyLinkConfirmation }));
|
dispatch(showAlert({ message: messages.copyLinkConfirmation }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -196,13 +196,14 @@ export const CollectionMenu: React.FC<{
|
|||||||
id,
|
id,
|
||||||
openShareModal,
|
openShareModal,
|
||||||
isOwnCollection,
|
isOwnCollection,
|
||||||
|
collection.url,
|
||||||
dispatch,
|
dispatch,
|
||||||
openDeleteConfirmation,
|
openDeleteConfirmation,
|
||||||
context,
|
context,
|
||||||
currentAccountInCollection,
|
currentAccountInCollection,
|
||||||
openReportModal,
|
openReportModal,
|
||||||
openBlockModal,
|
|
||||||
openRevokeConfirmation,
|
openRevokeConfirmation,
|
||||||
|
openBlockModal,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export const CollectionShareModal: React.FC<{
|
|||||||
const isNew = !!location.state?.newCollection;
|
const isNew = !!location.state?.newCollection;
|
||||||
const isOwnCollection = collection.account_id === me;
|
const isOwnCollection = collection.account_id === me;
|
||||||
|
|
||||||
const collectionLink = `${window.location.origin}/collections/${collection.id}`;
|
const collectionLink = collection.url;
|
||||||
|
|
||||||
const handleShareOnDevice = useCallback(() => {
|
const handleShareOnDevice = useCallback(() => {
|
||||||
void navigator.share({
|
void navigator.share({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user