aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-frontend/src
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-19 17:37:04 +0100
committerGravatar Joe Banks <[email protected]>2024-08-19 17:37:04 +0100
commit96120a37c52e86149fb7513e34014e44452d916d (patch)
treefb31c7c6739e9e4c961a2e9f5279378f5d1fe3d0 /thallium-frontend/src
parentbackend: Add CORSMiddleware to allow CORS requests from Thallium Frontend (diff)
Render Voucher ID on validation
Diffstat (limited to 'thallium-frontend/src')
-rw-r--r--thallium-frontend/src/components/VoucherValidator.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/thallium-frontend/src/components/VoucherValidator.tsx b/thallium-frontend/src/components/VoucherValidator.tsx
index e30e659..f3ccc3e 100644
--- a/thallium-frontend/src/components/VoucherValidator.tsx
+++ b/thallium-frontend/src/components/VoucherValidator.tsx
@@ -10,6 +10,12 @@ const VoucherDetails = styled.div<{ $some: boolean }>`
overflow: hidden;
`;
+const VoucherID = styled.span`
+background-color: ${({ theme }) => theme.cardShadow};
+padding: 4px;
+font-weight: bold;
+`;
+
const VoucherValidator = () => {
const [voucherCode, setVoucherCode] = useState("");
const [foundVoucher, setFoundVoucher] = useState<Voucher | null>(null);
@@ -53,6 +59,7 @@ const VoucherValidator = () => {
{foundVoucher && (
<>
<h3>Voucher Information</h3>
+ <p>ID: <VoucherID>{foundVoucher.id}</VoucherID></p>
<p>Voucher Code: {foundVoucher.voucher_code}</p>
<p>Active: {foundVoucher.active ? "Yes" : "No"}</p>
<p>Balance: {foundVoucher.balance}</p>