chore: add load more functionality, with refactored css
This commit is contained in:
@@ -1,29 +1,15 @@
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
|
||||
import StayCard from "../StayCard"
|
||||
|
||||
import styles from "./stayList.module.css"
|
||||
|
||||
import { StayListProps } from "@/types/components/myPages/stays/stayList"
|
||||
import { StayListProps } from "@/types/components/myPages/myStays/stayList"
|
||||
|
||||
export default function StayList({ lang, stays }: StayListProps) {
|
||||
return (
|
||||
<section>
|
||||
<section className={styles.stays}>
|
||||
{stays.map((stay) => (
|
||||
<StayCard
|
||||
key={stay.uid}
|
||||
stay={stay}
|
||||
lang={lang}
|
||||
showDayCount={true}
|
||||
/>
|
||||
))}
|
||||
</section>
|
||||
<div className={styles.buttonContainer}>
|
||||
<Button intent="primary" type="button">
|
||||
Show more
|
||||
</Button>
|
||||
</div>
|
||||
<section className={styles.stays}>
|
||||
{stays.map((stay) => (
|
||||
<StayCard key={stay.uid} stay={stay} lang={lang} />
|
||||
))}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -15,18 +15,8 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.buttonContainer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 950px) {
|
||||
.stays {
|
||||
grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
|
||||
}
|
||||
|
||||
.buttonContainer {
|
||||
margin-top: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user