feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -55,7 +55,9 @@ export default async function Profile() {
|
||||
const addressOutput =
|
||||
addressParts.length > 0
|
||||
? addressParts.join(", ")
|
||||
: intl.formatMessage({ id: "N/A" })
|
||||
: intl.formatMessage({
|
||||
defaultMessage: "N/A",
|
||||
})
|
||||
|
||||
const userLang = isValidLang(user.language) ? user.language : Lang.en
|
||||
const localizedLanguage = displayNames.language.of(userLang)
|
||||
@@ -69,7 +71,9 @@ export default async function Profile() {
|
||||
<Header>
|
||||
<div>
|
||||
<Title as="h4" color="red" level="h1" textTransform="capitalize">
|
||||
{intl.formatMessage({ id: "Welcome" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Welcome",
|
||||
})}
|
||||
</Title>
|
||||
<Title
|
||||
data-hj-suppress
|
||||
@@ -83,7 +87,9 @@ export default async function Profile() {
|
||||
</div>
|
||||
<Button asChild intent="primary" size="small" theme="base">
|
||||
<Link prefetch={false} color="none" href={profileEdit[lang]}>
|
||||
{intl.formatMessage({ id: "Edit profile" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Edit profile",
|
||||
})}
|
||||
</Link>
|
||||
</Button>
|
||||
</Header>
|
||||
@@ -95,28 +101,36 @@ export default async function Profile() {
|
||||
color="Icon/Interactive/Default"
|
||||
/>
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{intl.formatMessage({ id: "Date of Birth" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Date of Birth",
|
||||
})}
|
||||
</Body>
|
||||
<Body color="burgundy">{user.dateOfBirth}</Body>
|
||||
</div>
|
||||
<div className={styles.item}>
|
||||
<MaterialIcon icon="phone" color="Icon/Interactive/Default" />
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{intl.formatMessage({ id: "Phone number" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Phone number",
|
||||
})}
|
||||
</Body>
|
||||
<Body color="burgundy">{user.phoneNumber}</Body>
|
||||
</div>
|
||||
<div className={styles.item}>
|
||||
<MaterialIcon icon="globe" color="Icon/Interactive/Default" />
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{intl.formatMessage({ id: "Language" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Language",
|
||||
})}
|
||||
</Body>
|
||||
<Body color="burgundy">{normalizedLanguage}</Body>
|
||||
</div>
|
||||
<div className={styles.item}>
|
||||
<MaterialIcon icon="mail" color="Icon/Interactive/Default" />
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{intl.formatMessage({ id: "Email" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Email",
|
||||
})}
|
||||
</Body>
|
||||
<Body color="burgundy">{user.email}</Body>
|
||||
</div>
|
||||
@@ -126,15 +140,20 @@ export default async function Profile() {
|
||||
color="Icon/Interactive/Default"
|
||||
/>
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{intl.formatMessage({ id: "Address" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Address",
|
||||
})}
|
||||
</Body>
|
||||
<Body color="burgundy">{addressOutput}</Body>
|
||||
</div>
|
||||
<div className={styles.item}>
|
||||
<MaterialIcon icon="lock" color="Icon/Interactive/Default" />
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{intl.formatMessage({ id: "Password" })}
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Password",
|
||||
})}
|
||||
</Body>
|
||||
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
|
||||
<Body color="burgundy">**********</Body>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user