From 27bdce3199e3aece799e165e816e97a374ecaa6b Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Tue, 7 Nov 2023 14:17:17 +0800 Subject: [PATCH] fix type check --- admin/types.go | 6 +++--- app/src/components/admin/InfoBox.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/types.go b/admin/types.go index 80ae9a8..a34babd 100644 --- a/admin/types.go +++ b/admin/types.go @@ -1,9 +1,9 @@ package admin type InfoForm struct { - BillingToday int64 `json:"billing_today"` - BillingMonth int64 `json:"billing_month"` - SubscriptionCount int64 `json:"subscription_count"` + BillingToday float32 `json:"billing_today"` + BillingMonth float32 `json:"billing_month"` + SubscriptionCount int64 `json:"subscription_count"` } type ModelData struct { diff --git a/app/src/components/admin/InfoBox.tsx b/app/src/components/admin/InfoBox.tsx index 5c10cfd..daa2063 100644 --- a/app/src/components/admin/InfoBox.tsx +++ b/app/src/components/admin/InfoBox.tsx @@ -22,7 +22,7 @@ function InfoBox() {
{t("admin.billing-today")}
-
{form.billing_today}
+
{form.billing_today.toFixed(2)}
@@ -32,7 +32,7 @@ function InfoBox() {
{t("admin.billing-month")}
-
{form.billing_month}
+
{form.billing_month.toFixed(2)}