Update pt-BR. Reverted hostUrl change.
This commit is contained in:
@@ -15,7 +15,7 @@ import { WebsiteContext } from 'app/(main)/websites/[websiteId]/WebsiteProvider'
|
||||
|
||||
const generateId = () => getRandomChars(16);
|
||||
|
||||
export function ShareUrl({ onSave }: { websiteId: string; onSave?: () => void }) {
|
||||
export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () => void }) {
|
||||
const website = useContext(WebsiteContext);
|
||||
const { domain, shareId } = website;
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
@@ -26,7 +26,7 @@ export function ShareUrl({ onSave }: { websiteId: string; onSave?: () => void })
|
||||
});
|
||||
const { touch } = useModified();
|
||||
|
||||
const url = `${process.env.shareUrlHost || window?.location.origin || ''}${
|
||||
const url = `${hostUrl || window?.location.origin || ''}${
|
||||
process.env.basePath || ''
|
||||
}/share/${id}/${domain}`;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useMessages, useConfig } from 'components/hooks';
|
||||
|
||||
const SCRIPT_NAME = 'script.js';
|
||||
|
||||
export function TrackingCode({ websiteId }: { websiteId: string }) {
|
||||
export function TrackingCode({ websiteId, hostUrl }: { websiteId: string; hostUrl?: string }) {
|
||||
const { formatMessage, messages } = useMessages();
|
||||
const config = useConfig();
|
||||
|
||||
@@ -12,7 +12,7 @@ export function TrackingCode({ websiteId }: { websiteId: string }) {
|
||||
|
||||
const url = trackerScriptName?.startsWith('http')
|
||||
? trackerScriptName
|
||||
: `${process.env.trackerScriptHost || window?.location.origin || ''}${
|
||||
: `${hostUrl || window?.location.origin || ''}${
|
||||
process.env.basePath || ''
|
||||
}/${trackerScriptName}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user