mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Refactored intl messages.
This commit is contained in:
parent
fbccf4d3af
commit
7725b5c129
44 changed files with 558 additions and 485 deletions
|
|
@ -1,7 +1,10 @@
|
|||
import { TextArea } from 'react-basics';
|
||||
import { TRACKER_SCRIPT_URL } from 'lib/constants';
|
||||
import { messages } from 'components/messages';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
export default function TrackingCode({ websiteId }) {
|
||||
const { formatMessage } = useIntl();
|
||||
const url = TRACKER_SCRIPT_URL.startsWith('http')
|
||||
? TRACKER_SCRIPT_URL
|
||||
: `${location.origin}${TRACKER_SCRIPT_URL}`;
|
||||
|
|
@ -10,10 +13,7 @@ export default function TrackingCode({ websiteId }) {
|
|||
|
||||
return (
|
||||
<>
|
||||
<p>
|
||||
To track stats for this website, place the following code in the <code><head></code>{' '}
|
||||
section of your HTML.
|
||||
</p>
|
||||
<p>{formatMessage(messages.trackingCode)}</p>
|
||||
<TextArea rows={4} value={code} readOnly allowCopy />
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue