Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
add formatted message to reset website
Francis Cao5692c0e07df3
diff --git a/components/messages.js b/components/messages.jsindex aa268225f..245e85919 100644--- a/components/messages.js+++ b/components/messages.js@@ -158,6 +158,10 @@ export const messages = defineMessages({id: 'message.team-already-member',defaultMessage: 'You are already a member of the team.',},+ deleteAccount: {+ id: 'message.delete-account',+ defaultMessage: 'To delete this account, type {confirmation} in the box below to confirm.',+ },deleteWebsite: {id: 'message.delete-website',defaultMessage: 'To delete this website, type {confirmation} in the box below to confirm.',diff --git a/components/pages/settings/websites/WebsiteResetForm.js b/components/pages/settings/websites/WebsiteResetForm.jsindex 4ac241690..5fc0acf7a 100644--- a/components/pages/settings/websites/WebsiteResetForm.js+++ b/components/pages/settings/websites/WebsiteResetForm.js@@ -13,7 +13,7 @@ import useMessages from 'hooks/useMessages';const CONFIRM_VALUE = 'RESET';export function WebsiteResetForm({ websiteId, onSave, onClose }) {- const { formatMessage, labels, messages } = useMessages();+ const { formatMessage, labels, messages, FormattedMessage } = useMessages();const { post, useMutation } = useApi();const { mutate, error } = useMutation(data => post(`/websites/${websiteId}/reset`, data));@@ -28,7 +28,12 @@ export function WebsiteResetForm({ websiteId, onSave, onClose }) {return (<Form onSubmit={handleSubmit} error={error}>- <p>{formatMessage(messages.resetWebsite, { confirmation: CONFIRM_VALUE })}</p>+ <p>+ <FormattedMessage+ {...messages.resetWebsite}+ values={{ confirmation: <b>{CONFIRM_VALUE}</b> }}+ />+ </p><FormRow label={formatMessage(labels.confirm)}><FormInput name="confirm" rules={{ validate: value => value === CONFIRM_VALUE }}><TextField autoComplete="off" />