fix: empty previous stays design
This commit is contained in:
@@ -8,7 +8,6 @@ import Grids from "@/components/TempDesignSystem/Grids"
|
||||
import ListContainer from "../ListContainer"
|
||||
import ShowMoreButton from "../ShowMoreButton"
|
||||
import StayCard from "../StayCard"
|
||||
import EmptyPreviousStaysBlock from "./EmptyPreviousStays"
|
||||
|
||||
import type {
|
||||
PreviousStaysClientProps,
|
||||
@@ -46,7 +45,7 @@ export default function ClientPreviousStays({
|
||||
|
||||
return isLoading ? (
|
||||
<LoadingSpinner />
|
||||
) : stays.length ? (
|
||||
) : (
|
||||
<ListContainer>
|
||||
<Grids.Stackable>
|
||||
{stays.map((stay) => (
|
||||
@@ -61,7 +60,5 @@ export default function ClientPreviousStays({
|
||||
<ShowMoreButton disabled={isFetching} loadMoreData={loadMoreData} />
|
||||
) : null}
|
||||
</ListContainer>
|
||||
) : (
|
||||
<EmptyPreviousStaysBlock />
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
.container {
|
||||
align-items: center;
|
||||
background-color: var(--some-grey-color, #f2f2f2);
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 25rem;
|
||||
align-items: center;
|
||||
background-color: var(--Scandic-Brand-Pale-Peach);
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
margin-bottom: var(--Spacing-x-half);
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./emptyPreviousStays.module.css"
|
||||
|
||||
export default function EmptyPreviousStaysBlock() {
|
||||
const { formatMessage } = useIntl()
|
||||
export default async function EmptyPreviousStaysBlock() {
|
||||
const { formatMessage } = await getIntl()
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<Title as="h5" level="h3">
|
||||
{formatMessage({ id: "You have no previous stays." })}
|
||||
<Title as="h5" level="h3" color="red" textAlign="center">
|
||||
{formatMessage({
|
||||
id: "You have no previous stays.",
|
||||
})}
|
||||
</Title>
|
||||
</section>
|
||||
)
|
||||
|
||||
@@ -5,6 +5,7 @@ import SectionHeader from "@/components/Section/Header"
|
||||
import SectionLink from "@/components/Section/Link"
|
||||
|
||||
import ClientPreviousStays from "./Client"
|
||||
import EmptyPreviousStaysBlock from "./EmptyPreviousStays"
|
||||
|
||||
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
|
||||
@@ -21,10 +22,14 @@ export default async function PreviousStays({
|
||||
return (
|
||||
<SectionContainer>
|
||||
<SectionHeader title={title} subtitle={subtitle} link={link} />
|
||||
<ClientPreviousStays
|
||||
initialPreviousStays={initialPreviousStays}
|
||||
lang={lang}
|
||||
/>
|
||||
{initialPreviousStays.data.length ? (
|
||||
<ClientPreviousStays
|
||||
initialPreviousStays={initialPreviousStays}
|
||||
lang={lang}
|
||||
/>
|
||||
) : (
|
||||
<EmptyPreviousStaysBlock />
|
||||
)}
|
||||
<SectionLink link={link} variant="mobile" />
|
||||
</SectionContainer>
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ export default async function EmptyUpcomingStaysBlock({ lang }: LangParams) {
|
||||
<Title as="h5" level="h3" color="red" className={styles.title}>
|
||||
{formatMessage({ id: "You have no upcoming stays." })}
|
||||
<span className={styles.burgundyTitle}>
|
||||
{formatMessage({ id: "Where will you go next?" })}
|
||||
{formatMessage({ id: "Where should you go next?" })}
|
||||
</span>
|
||||
</Title>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user