fix: adjust table scaling

This commit is contained in:
Arvid Norlin
2024-05-21 12:09:16 +02:00
parent 607334aad5
commit 90bd302715
4 changed files with 15 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
.card { .card {
background-color: var(--Base-Fill-Normal); background-color: var(--Base-Fill-Normal);
border-radius: 16px; border-radius: 16px;
color: var(Theme/Primary/Light/On Surface/Text); color: var(--Theme-Primary-Light-On-Surface-Text);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;

View File

@@ -10,7 +10,7 @@ async function CurrentPointsBalance() {
<h2>{`${_("Total points")}*`}</h2> <h2>{`${_("Total points")}*`}</h2>
<p <p
className={styles.points} className={styles.points}
>{`${_("Points")}: ${user.membership.currentPoints}`}</p> >{`${_("Points")}: ${user.membership?.currentPoints || "N/A"}`}</p>
<p className={styles.disclaimer}> <p className={styles.disclaimer}>
{`*${_("Points may take up to 10 days to be displayed.")}`} {`*${_("Points may take up to 10 days to be displayed.")}`}
</p> </p>

View File

@@ -1,8 +1,8 @@
.container { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
gap: 16px; gap: 16px;
overflow-x: auto;
} }
.table { .table {
@@ -31,12 +31,9 @@
padding: 16px 32px; padding: 16px 32px;
} }
.emptyPlaceholder { .placeholder {
display: flex; width: 100%;
flex-direction: column; padding: 24px;
align-items: center; text-align: center;
padding: 20px;
font-size: var(--typography-Title5-Desktop-fontSize);
border: 1px solid var(--Base-Fill-Normal); border: 1px solid var(--Base-Fill-Normal);
border-top: none;
} }

View File

@@ -72,7 +72,7 @@ function EarnAndBurn({ lang }: EarnAndBurnProps) {
</Button> */} </Button> */}
</div> </div>
) : ( ) : (
<div> <div className={styles.container}>
<table className={styles.table}> <table className={styles.table}>
<thead className={styles.thead}> <thead className={styles.thead}>
<tr> <tr>
@@ -83,10 +83,14 @@ function EarnAndBurn({ lang }: EarnAndBurnProps) {
))} ))}
</tr> </tr>
</thead> </thead>
<tbody>
<tr>
<td colSpan={tableHeadings.length} className={styles.placeholder}>
{_("No transactions available")}
</td>
</tr>
</tbody>
</table> </table>
<div className={styles.emptyPlaceholder}>
{_("No transactions available")}
</div>
</div> </div>
) )
} }