chore: replace function expression with inline statement
replace destructuring for better static analysis remove unused variables
This commit is contained in:
@@ -4,11 +4,11 @@ import { getIntl } from "@/i18n"
|
||||
import styles from "./emptyPreviousStays.module.css"
|
||||
|
||||
export default async function EmptyPreviousStaysBlock() {
|
||||
const { formatMessage } = await getIntl()
|
||||
const intl = await getIntl()
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<Title as="h4" level="h3" color="red" textAlign="center">
|
||||
{formatMessage({
|
||||
{intl.formatMessage({
|
||||
id: "You have no previous stays.",
|
||||
})}
|
||||
</Title>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function ShowMoreButton({
|
||||
disabled,
|
||||
loadMoreData,
|
||||
}: ShowMoreButtonParams) {
|
||||
const { formatMessage } = useIntl()
|
||||
const intl = useIntl()
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Button
|
||||
@@ -25,7 +25,7 @@ export default function ShowMoreButton({
|
||||
intent="text"
|
||||
>
|
||||
<ChevronDownIcon />
|
||||
{formatMessage({ id: "Show more" })}
|
||||
{intl.formatMessage({ id: "Show more" })}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -10,14 +10,14 @@ import { getLang } from "@/i18n/serverContext"
|
||||
import styles from "./emptyUpcomingStays.module.css"
|
||||
|
||||
export default async function EmptyUpcomingStaysBlock() {
|
||||
const { formatMessage } = await getIntl()
|
||||
const intl = await getIntl()
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<div className={styles.titleContainer}>
|
||||
<Title as="h4" level="h3" color="red" className={styles.title}>
|
||||
{formatMessage({ id: "You have no upcoming stays." })}
|
||||
{intl.formatMessage({ id: "You have no upcoming stays." })}
|
||||
<span className={styles.burgundyTitle}>
|
||||
{formatMessage({ id: "Where should you go next?" })}
|
||||
{intl.formatMessage({ id: "Where should you go next?" })}
|
||||
</span>
|
||||
</Title>
|
||||
</div>
|
||||
@@ -26,7 +26,7 @@ export default async function EmptyUpcomingStaysBlock() {
|
||||
className={styles.link}
|
||||
color="peach80"
|
||||
>
|
||||
{formatMessage({ id: "Get inspired" })}
|
||||
{intl.formatMessage({ id: "Get inspired" })}
|
||||
<ArrowRightIcon color="peach80" />
|
||||
</Link>
|
||||
</section>
|
||||
|
||||
@@ -10,14 +10,14 @@ import { getLang } from "@/i18n/serverContext"
|
||||
import styles from "./emptyUpcomingStays.module.css"
|
||||
|
||||
export default async function EmptyUpcomingStaysBlock() {
|
||||
const { formatMessage } = await getIntl()
|
||||
const intl = await getIntl()
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<div className={styles.titleContainer}>
|
||||
<Title as="h4" level="h3" color="red" className={styles.title}>
|
||||
{formatMessage({ id: "You have no upcoming stays." })}
|
||||
{intl.formatMessage({ id: "You have no upcoming stays." })}
|
||||
<span className={styles.burgundyTitle}>
|
||||
{formatMessage({ id: "Where should you go next?" })}
|
||||
{intl.formatMessage({ id: "Where should you go next?" })}
|
||||
</span>
|
||||
</Title>
|
||||
</div>
|
||||
@@ -26,7 +26,7 @@ export default async function EmptyUpcomingStaysBlock() {
|
||||
className={styles.link}
|
||||
color="peach80"
|
||||
>
|
||||
{formatMessage({ id: "Get inspired" })}
|
||||
{intl.formatMessage({ id: "Get inspired" })}
|
||||
<ArrowRightIcon color="peach80" />
|
||||
</Link>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user