fix: align styles
This commit is contained in:
@@ -36,7 +36,7 @@ function DynamicComponent({ user, lang, content }: AccountPageContentProps) {
|
|||||||
|
|
||||||
switch (content.component) {
|
switch (content.component) {
|
||||||
case DynamicContentComponents.membership_overview:
|
case DynamicContentComponents.membership_overview:
|
||||||
return <Overview user={user} />
|
return <Overview user={user} title={content.title} />
|
||||||
case DynamicContentComponents.previous_stays:
|
case DynamicContentComponents.previous_stays:
|
||||||
return <PreviousStays {...componentProps} />
|
return <PreviousStays {...componentProps} />
|
||||||
case DynamicContentComponents.soonest_stays:
|
case DynamicContentComponents.soonest_stays:
|
||||||
|
|||||||
@@ -1,20 +1,29 @@
|
|||||||
.cardContainer {
|
.container {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 4px;
|
gap: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
.value {
|
.value {
|
||||||
color: var(--some-red-color, #ed2027);
|
color: var(--some-red-color, #ed2027);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cardContainer {
|
||||||
|
display: grid;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
.cardSubtitle {
|
.cardSubtitle {
|
||||||
font-family: var(--ff-fira-sans);
|
font-family: var(--ff-fira-sans);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ export default async function CurrentBenefitsBlock({
|
|||||||
const benefits = await serverClient().user.benefits.current()
|
const benefits = await serverClient().user.benefits.current()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section className={styles.container}>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title as="h4" level="h2" className={styles.title} uppercase>
|
<Title as="h3" level="h2" className={styles.title} uppercase>
|
||||||
{title}
|
{title}
|
||||||
</Title>
|
</Title>
|
||||||
{link && (
|
{link && (
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default async function NextLevelBenefitsBlock({
|
|||||||
return (
|
return (
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title as="h4" level="h2" uppercase className={styles.title}>
|
<Title as="h3" level="h2" uppercase className={styles.title}>
|
||||||
{title}
|
{title}
|
||||||
{link && (
|
{link && (
|
||||||
<Link className={styles.link} href={link.href}>
|
<Link className={styles.link} href={link.href}>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardContainer {
|
.cardContainer {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
@@ -16,6 +17,10 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
.card {
|
.card {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
import { _ } from "@/lib/translation"
|
|
||||||
import { serverClient } from "@/lib/trpc/server"
|
|
||||||
|
|
||||||
import StayCard from "@/components/MyPages/Blocks/Stays/StayCard"
|
|
||||||
import EmptyUpcomingStaysBlock from "@/components/MyPages/Blocks/Stays/Upcoming/EmptyUpcomingStays"
|
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
|
||||||
import Title from "@/components/Title"
|
|
||||||
|
|
||||||
import styles from "./upcoming.module.css"
|
|
||||||
|
|
||||||
import type { LangParams } from "@/types/params"
|
|
||||||
|
|
||||||
export default async function UpcomingStays({ lang }: LangParams) {
|
|
||||||
const stays = await serverClient().user.stays.upcoming({
|
|
||||||
perPage: 3,
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section className={styles.container}>
|
|
||||||
<header className={styles.header}>
|
|
||||||
<Title level="h2" as="h5" uppercase>
|
|
||||||
{_("Your upcoming stays")}
|
|
||||||
</Title>
|
|
||||||
<Link className={styles.link} href="#">
|
|
||||||
{_("See all")}
|
|
||||||
</Link>
|
|
||||||
</header>
|
|
||||||
{stays.data.length ? (
|
|
||||||
<section className={styles.stays}>
|
|
||||||
{stays.data.map((stay) => (
|
|
||||||
<StayCard key={stay.uid} stay={stay} lang={lang} />
|
|
||||||
))}
|
|
||||||
</section>
|
|
||||||
) : (
|
|
||||||
<EmptyUpcomingStaysBlock />
|
|
||||||
)}
|
|
||||||
</section>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
.container {
|
|
||||||
display: grid;
|
|
||||||
gap: 2.2rem;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-right: -2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
align-items: baseline;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stays {
|
|
||||||
display: flex;
|
|
||||||
gap: 2rem;
|
|
||||||
overflow-x: auto;
|
|
||||||
|
|
||||||
/* Hide scrollbar IE and Edge */
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
/* Hide Scrollbar Firefox */
|
|
||||||
scrollbar-width: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hide Scrollbar Chrome, Safari and Opera */
|
|
||||||
.stays::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 950px) {
|
|
||||||
.container {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 950px) {
|
|
||||||
.stays {
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.link {
|
|
||||||
color: var(--some-black-color, #111);
|
|
||||||
display: inline-block;
|
|
||||||
font-family: var(--ff-fira-sans);
|
|
||||||
font-size: 1.4rem;
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 1.2%;
|
|
||||||
line-height: 140%;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,12 +7,12 @@ import styles from "./overview.module.css"
|
|||||||
|
|
||||||
import type { OverviewProps } from "@/types/components/myPages/myPage/overview"
|
import type { OverviewProps } from "@/types/components/myPages/myPage/overview"
|
||||||
|
|
||||||
export default function Overview({ user }: OverviewProps) {
|
export default function Overview({ user, title }: OverviewProps) {
|
||||||
return (
|
return (
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
<header>
|
<header>
|
||||||
<Title as="h2" uppercase>
|
<Title as="h3" level="h2" uppercase className={styles.title}>
|
||||||
Good morning
|
{title}
|
||||||
</Title>
|
</Title>
|
||||||
</header>
|
</header>
|
||||||
<section className={styles.overview}>
|
<section className={styles.overview}>
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
gap: 0.8rem;
|
gap: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.overview {
|
.overview {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 1.7rem;
|
gap: 1.7rem;
|
||||||
|
|||||||
@@ -10,7 +10,13 @@ export default function Header({ title, subtitle, link }: HeaderProps) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title className={styles.title} as="h3" weight="semiBold" uppercase>
|
<Title
|
||||||
|
as="h3"
|
||||||
|
level="h2"
|
||||||
|
className={styles.title}
|
||||||
|
weight="semiBold"
|
||||||
|
uppercase
|
||||||
|
>
|
||||||
{title}
|
{title}
|
||||||
</Title>
|
</Title>
|
||||||
{link && (
|
{link && (
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { User } from "@/types/user"
|
import type { User } from "@/types/user"
|
||||||
|
|
||||||
export type OverviewProps = {
|
export type OverviewProps = {
|
||||||
|
title: string
|
||||||
user: User
|
user: User
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user