Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
madhead committed Oct 26, 2023
1 parent c79b194 commit 6f78f2e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
10 changes: 6 additions & 4 deletions mini-app/src/common/transaction/Transaction.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
flex-direction: column;

color: var(--tg-theme-hint-color);
text-align: center;
text-align: justify;
text-justify: auto;
min-width: 40px;
margin-inline-end: 8px;

Expand Down Expand Up @@ -55,8 +56,9 @@
}

& > .title {
font-size: 16pt;
line-height: 36pt;
display: flex;
flex-direction: column-reverse;
font-size: 18pt;
color: var(--tg-theme-text-color);
flex-grow: 1;
padding-inline: 8px 8px;
Expand Down Expand Up @@ -84,7 +86,7 @@
text-transform: uppercase;
}

& > .amount {
& > .quantity {
font-size: 24pt;
line-height: 24pt;
}
Expand Down
2 changes: 1 addition & 1 deletion mini-app/src/common/transaction/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Amount({ amount, currency }: { amount: string; currency: string }) {
return (
<div className="amount">
<div className="currency">{currency}</div>
<div className="amount">{formatAmount(amount)}</div>
<div className="quantity">{formatAmount(amount)}</div>
</div>
);
}
7 changes: 5 additions & 2 deletions mini-app/src/history/HistoryApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AppWrapper from "../common/AppWrapper";
import TransactionCard, {
Transaction,
} from "../common/transaction/Transaction";
import { useTranslation } from "react-i18next";

type Member = {
id: number;
Expand Down Expand Up @@ -47,12 +48,14 @@ function HistoryApp() {
loadTransactions();
}, []);

const { t } = useTranslation();

return (
<>
<div className="history">
{transactions.map((transaction) => (
<TransactionCard key={transaction.id} {...transaction} />
))}
</>
</div>
);
}

Expand Down
2 changes: 1 addition & 1 deletion mini-app/src/history/history.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body {
#root {
min-height: 100vh;
box-sizing: border-box;
padding: 24px;
padding: 0 16px;
display: flex;
flex-direction: column;
}
3 changes: 3 additions & 0 deletions mini-app/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"outsideOfTelegram": "This app must be executed inside a Telegram client",
"expired": "Authorisation token expired. Restart the app.",
"unauthorized": "You are not authorized to use this app"
},
"history": {
"title": "Transactions history"
}
}

0 comments on commit 6f78f2e

Please sign in to comment.