mirror of
https://github.com/umami-software/umami.git
synced 2026-02-23 22:15:35 +01:00
Updated handling of env vars.
This commit is contained in:
parent
abd0913e9b
commit
30c1933718
8 changed files with 192 additions and 155 deletions
|
|
@ -15,14 +15,7 @@ import { WebsiteContext } from 'app/(main)/websites/[websiteId]/WebsiteProvider'
|
|||
|
||||
const generateId = () => getRandomChars(16);
|
||||
|
||||
export function ShareUrl({
|
||||
hostUrl,
|
||||
onSave,
|
||||
}: {
|
||||
websiteId: string;
|
||||
hostUrl?: string;
|
||||
onSave?: () => void;
|
||||
}) {
|
||||
export function ShareUrl({ onSave }: { websiteId: string; onSave?: () => void }) {
|
||||
const website = useContext(WebsiteContext);
|
||||
const { domain, shareId } = website;
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
|
|
@ -33,8 +26,8 @@ export function ShareUrl({
|
|||
});
|
||||
const { touch } = useModified();
|
||||
|
||||
const url = `${hostUrl || process.env.hostUrl || window?.location.origin}${
|
||||
process.env.basePath
|
||||
const url = `${process.env.shareUrlHost || window?.location.origin || ''}${
|
||||
process.env.basePath || ''
|
||||
}/share/${id}/${domain}`;
|
||||
|
||||
const handleGenerate = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue