mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Added hostUrl prop.
This commit is contained in:
parent
d5b4da63df
commit
117cb6168c
@ -10,7 +10,15 @@ import ShareUrl from './ShareUrl';
|
|||||||
import { useMessages } from 'components/hooks';
|
import { useMessages } from 'components/hooks';
|
||||||
import { WebsiteContext } from 'app/(main)/websites/[websiteId]/WebsiteProvider';
|
import { WebsiteContext } from 'app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||||
|
|
||||||
export function WebsiteSettings({ websiteId, openExternal = false }) {
|
export function WebsiteSettings({
|
||||||
|
websiteId,
|
||||||
|
hostUrl,
|
||||||
|
openExternal = false,
|
||||||
|
}: {
|
||||||
|
websiteId: string;
|
||||||
|
hostUrl: string;
|
||||||
|
openExternal: boolean;
|
||||||
|
}) {
|
||||||
const website = useContext(WebsiteContext);
|
const website = useContext(WebsiteContext);
|
||||||
const { formatMessage, labels, messages } = useMessages();
|
const { formatMessage, labels, messages } = useMessages();
|
||||||
const [tab, setTab] = useState<Key>('details');
|
const [tab, setTab] = useState<Key>('details');
|
||||||
@ -39,7 +47,7 @@ export function WebsiteSettings({ websiteId, openExternal = false }) {
|
|||||||
<Item key="data">{formatMessage(labels.data)}</Item>
|
<Item key="data">{formatMessage(labels.data)}</Item>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
{tab === 'details' && <WebsiteEditForm websiteId={websiteId} onSave={handleSave} />}
|
{tab === 'details' && <WebsiteEditForm websiteId={websiteId} onSave={handleSave} />}
|
||||||
{tab === 'tracking' && <TrackingCode websiteId={websiteId} />}
|
{tab === 'tracking' && <TrackingCode websiteId={websiteId} hostUrl={hostUrl} />}
|
||||||
{tab === 'share' && <ShareUrl websiteId={websiteId} onSave={handleSave} />}
|
{tab === 'share' && <ShareUrl websiteId={websiteId} onSave={handleSave} />}
|
||||||
{tab === 'data' && <WebsiteData websiteId={websiteId} onSave={handleSave} />}
|
{tab === 'data' && <WebsiteData websiteId={websiteId} onSave={handleSave} />}
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user