fix host change for local shared album

This commit is contained in:
Abhinav 2022-01-25 16:15:30 +05:30
parent 94a0c07430
commit 041e995baf

View file

@ -17,6 +17,7 @@ import constants from 'utils/strings/constants';
import { Collection } from 'types/collection';
import { CollectionType } from 'constants/collection';
import CryptoWorker from 'utils/crypto';
import { getAlbumSiteHost } from 'constants/pages';
export enum COLLECTION_OPS_TYPE {
ADD,
@ -119,7 +120,7 @@ export async function appendCollectionKeyToShareURL(
}
const sharableURL = new URL(url);
if (process.env.NODE_ENV === 'development') {
sharableURL.host = 'localhost:3001';
sharableURL.host = getAlbumSiteHost();
sharableURL.protocol = 'http';
}
sharableURL.hash = await worker.toHex(collectionKey);