fix: disable button on not isComplete
This commit is contained in:
@@ -75,7 +75,11 @@ export default function SectionAccordion({
|
||||
</div>
|
||||
</div>
|
||||
<header className={styles.header}>
|
||||
<button onClick={onModify} className={styles.modifyButton}>
|
||||
<button
|
||||
onClick={onModify}
|
||||
disabled={!isComplete}
|
||||
className={styles.modifyButton}
|
||||
>
|
||||
<Footnote
|
||||
className={styles.title}
|
||||
asChild
|
||||
@@ -94,7 +98,9 @@ export default function SectionAccordion({
|
||||
)}
|
||||
</button>
|
||||
</header>
|
||||
<div className={styles.content}>{children}</div>
|
||||
<div className={styles.content}>
|
||||
<div className={styles.contentWrapper}>{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.modifyButton:disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.title {
|
||||
grid-area: title;
|
||||
text-align: start;
|
||||
@@ -81,7 +85,7 @@
|
||||
grid-template-rows: var(--header-height) 1fr;
|
||||
}
|
||||
|
||||
.accordion[data-open="true"] .content {
|
||||
.contentWrapper {
|
||||
padding-bottom: var(--Spacing-x3);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ export function filterDuplicateRoomTypesByLowestPrice(
|
||||
Math.min(
|
||||
Number(
|
||||
previousLowest.products[0].productType.public.localPrice
|
||||
.pricePerNight
|
||||
?.pricePerNight
|
||||
) ?? Infinity,
|
||||
Number(
|
||||
previousLowest.products[0].productType.member?.localPrice
|
||||
|
||||
Reference in New Issue
Block a user