fix: button for empty stays
This commit is contained in:
@@ -8,7 +8,6 @@ import Grids from "@/components/TempDesignSystem/Grids"
|
|||||||
import ListContainer from "../ListContainer"
|
import ListContainer from "../ListContainer"
|
||||||
import ShowMoreButton from "../ShowMoreButton"
|
import ShowMoreButton from "../ShowMoreButton"
|
||||||
import StayCard from "../StayCard"
|
import StayCard from "../StayCard"
|
||||||
import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays"
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
UpcomingStaysClientProps,
|
UpcomingStaysClientProps,
|
||||||
@@ -61,7 +60,5 @@ export default function ClientUpcomingStays({
|
|||||||
<ShowMoreButton disabled={isFetching} loadMoreData={loadMoreData} />
|
<ShowMoreButton disabled={isFetching} loadMoreData={loadMoreData} />
|
||||||
) : null}
|
) : null}
|
||||||
</ListContainer>
|
</ListContainer>
|
||||||
) : (
|
) : null
|
||||||
<EmptyUpcomingStaysBlock />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { homeHrefs } from "@/constants/homeHrefs"
|
||||||
|
import { env } from "@/env/server"
|
||||||
|
|
||||||
import Button from "@/components/TempDesignSystem/Button"
|
import Button from "@/components/TempDesignSystem/Button"
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||||
|
import { getIntl } from "@/i18n"
|
||||||
|
|
||||||
import styles from "./emptyUpcomingStays.module.css"
|
import styles from "./emptyUpcomingStays.module.css"
|
||||||
|
|
||||||
export default function EmptyUpcomingStaysBlock() {
|
import { LangParams } from "@/types/params"
|
||||||
const { formatMessage } = useIntl()
|
|
||||||
|
export default async function EmptyUpcomingStaysBlock({ lang }: LangParams) {
|
||||||
|
const { formatMessage } = await getIntl()
|
||||||
return (
|
return (
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
<Title as="h5" level="h3">
|
<Title as="h5" level="h3">
|
||||||
@@ -18,7 +22,9 @@ export default function EmptyUpcomingStaysBlock() {
|
|||||||
</span>
|
</span>
|
||||||
</Title>
|
</Title>
|
||||||
<Button asChild intent="primary" type="button">
|
<Button asChild intent="primary" type="button">
|
||||||
<Link href="#">{formatMessage({ id: "Get inspired" })}</Link>
|
<Link href={homeHrefs[env.NODE_ENV][lang]}>
|
||||||
|
{formatMessage({ id: "Get inspired" })}
|
||||||
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import SectionContainer from "@/components/Section/Container"
|
|||||||
import SectionHeader from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
|
||||||
import ClientUpcomingStays from "./Client"
|
import ClientUpcomingStays from "./Client"
|
||||||
|
import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays"
|
||||||
|
|
||||||
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||||
|
|
||||||
@@ -20,10 +21,14 @@ export default async function UpcomingStays({
|
|||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<SectionHeader title={title} subtitle={subtitle} link={link} />
|
<SectionHeader title={title} subtitle={subtitle} link={link} />
|
||||||
<ClientUpcomingStays
|
{initialUpcomingStays.data.length ? (
|
||||||
initialUpcomingStays={initialUpcomingStays}
|
<ClientUpcomingStays
|
||||||
lang={lang}
|
initialUpcomingStays={initialUpcomingStays}
|
||||||
/>
|
lang={lang}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<EmptyUpcomingStaysBlock lang={lang} />
|
||||||
|
)}
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user