From 4fe31544577390eb97660dfd72369140b3f05d2f Mon Sep 17 00:00:00 2001 From: arealclimber Date: Wed, 11 Oct 2023 17:26:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20link=20the=20reserve=20ca?= =?UTF-8?q?rds=20to=20BAIFA=20plugin=20and=20fix=20the=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in the i18n common about the financial reports ✅ Closes: #1290 #1180 --- package.json | 2 +- src/components/audit_report/audit_report.tsx | 12 +++--------- src/components/reserve_ratio/reserve_ratio.tsx | 14 ++++++++------ src/locales/cn/common.json | 6 +++--- src/locales/en/common.json | 6 +++--- src/locales/tw/common.json | 6 +++--- 6 files changed, 21 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index feb2c2af0..5d3d4e9d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "src", - "version": "0.8.0+55.2", + "version": "0.8.0+56.1", "private": true, "scripts": { "dev": "next dev", diff --git a/src/components/audit_report/audit_report.tsx b/src/components/audit_report/audit_report.tsx index b7dff798f..0b46fac9c 100644 --- a/src/components/audit_report/audit_report.tsx +++ b/src/components/audit_report/audit_report.tsx @@ -48,9 +48,7 @@ const AuditReport = () => {
@@ -70,9 +68,7 @@ const AuditReport = () => {
@@ -90,9 +86,7 @@ const AuditReport = () => {
diff --git a/src/components/reserve_ratio/reserve_ratio.tsx b/src/components/reserve_ratio/reserve_ratio.tsx index a8d085b07..4c8162235 100644 --- a/src/components/reserve_ratio/reserve_ratio.tsx +++ b/src/components/reserve_ratio/reserve_ratio.tsx @@ -11,6 +11,7 @@ import {FiDownload} from 'react-icons/fi'; import {useGlobal} from '../../contexts/global_context'; import {ToastTypeAndText} from '../../constants/toast_type'; import {numberFormatted} from '../../lib/common'; +import useCheckLink from '../../lib/hooks/use_check_link'; const ReserveRatio = () => { const {t}: {t: TranslateFunction} = useTranslation('common'); @@ -18,6 +19,7 @@ const ReserveRatio = () => { const {websiteReserve} = useContext(MarketContext); const {BTC, ETH, USDT} = websiteReserve; + const baifaLink = useCheckLink(BAIFA_LINK, BAIFA_LINK); const baifaProjectId = process.env.BAIFA_PROJECT_ID; // TODO: 用 isNumber 檢驗,資料傳給卡片之前都整理成 string (20230914 - Shirley) @@ -81,7 +83,7 @@ const ReserveRatio = () => { color="text-lightGreen2" ratio={usdtReserveRatio} icon="/asset_icon/usdt.svg" - link="/" + link={`${baifaLink}/reports/${baifaProjectId}/plugin`} userHoldings={usdtUserHolding} walletAssets={usdtReserve} /> @@ -90,7 +92,7 @@ const ReserveRatio = () => { color="text-bluePurple" ratio={ethReserveRatio} icon="/asset_icon/eth.svg" - link="/" + link={`${baifaLink}/reports/${baifaProjectId}/plugin`} userHoldings={ethUserHolding} walletAssets={ethReserve} /> @@ -99,7 +101,7 @@ const ReserveRatio = () => { color="text-lightOrange" ratio={btcReserveRatio} icon="/asset_icon/btc.svg" - link="/" + link={`${baifaLink}/reports/${baifaProjectId}/plugin`} userHoldings={btcUserHolding} walletAssets={btcReserve} /> @@ -114,7 +116,7 @@ const ReserveRatio = () => { color="text-lightGreen2" ratio={usdtReserveRatio} icon="/asset_icon/usdt.svg" - link="/" + link={`${baifaLink}/reports/${baifaProjectId}/plugin`} userHoldings={usdtUserHolding} walletAssets={usdtReserve} /> @@ -123,7 +125,7 @@ const ReserveRatio = () => { color="text-bluePurple" ratio={ethReserveRatio} icon="/asset_icon/eth.svg" - link="/" + link={`${baifaLink}/reports/${baifaProjectId}/plugin`} userHoldings={ethUserHolding} walletAssets={ethReserve} /> @@ -132,7 +134,7 @@ const ReserveRatio = () => { color="text-lightOrange" ratio={btcReserveRatio} icon="/asset_icon/btc.svg" - link="/" + link={`${baifaLink}/reports/${baifaProjectId}/plugin`} userHoldings={btcUserHolding} walletAssets={btcReserve} /> diff --git a/src/locales/cn/common.json b/src/locales/cn/common.json index b57de8f55..96fe57bb4 100644 --- a/src/locales/cn/common.json +++ b/src/locales/cn/common.json @@ -72,9 +72,9 @@ "APP_DOWLOAD_CONTAINER_TITLE_2": "进行交易。", "DOWNLOAD_REPORT": "下载报告", "REPORTS_LINK": "/balance", - "COMPREHENSIVE_INCOME_STATEMENT_LINK": "/comprehensive-income", - "BALANCE_SHEET_LINK": "/balance", - "CASH_FLOW_STATEMENT_LINK": "/cash-flow", + "COMPREHENSIVE_INCOME_STATEMENT_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/comprehensive-income", + "BALANCE_SHEET_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/balance", + "CASH_FLOW_STATEMENT_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/cash-flow", "RED_FLAG_ANALYSIS_LINK": "/reports/red_flag_analysis.pdf", "SMART": "人工智能", "AUDITING_REPORTS": "监管报告", diff --git a/src/locales/en/common.json b/src/locales/en/common.json index 392d1c238..5504af2ba 100644 --- a/src/locales/en/common.json +++ b/src/locales/en/common.json @@ -72,9 +72,9 @@ "APP_DOWLOAD_CONTAINER_TITLE_2": "anywhere, anytime", "DOWNLOAD_REPORT": "Download Report", "REPORTS_LINK": "/balance", - "COMPREHENSIVE_INCOME_STATEMENT_LINK": "/comprehensive-income", - "BALANCE_SHEET_LINK": "/balance", - "CASH_FLOW_STATEMENT_LINK": "/cash-flow", + "COMPREHENSIVE_INCOME_STATEMENT_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/comprehensive-income", + "BALANCE_SHEET_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/balance", + "CASH_FLOW_STATEMENT_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/cash-flow", "RED_FLAG_ANALYSIS_LINK": "/reports/red_flag_analysis.pdf", "SMART": "AI", "AUDITING_REPORTS": "Supervision Reports", diff --git a/src/locales/tw/common.json b/src/locales/tw/common.json index fa9e640f2..ad139fd7e 100644 --- a/src/locales/tw/common.json +++ b/src/locales/tw/common.json @@ -72,9 +72,9 @@ "APP_DOWLOAD_CONTAINER_TITLE_2": "進行交易。", "DOWNLOAD_REPORT": "下載報告", "REPORTS_LINK": "/balance", - "COMPREHENSIVE_INCOME_STATEMENT_LINK": "/comprehensive-income", - "BALANCE_SHEET_LINK": "/balance", - "CASH_FLOW_STATEMENT_LINK": "/cash-flow", + "COMPREHENSIVE_INCOME_STATEMENT_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/comprehensive-income", + "BALANCE_SHEET_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/balance", + "CASH_FLOW_STATEMENT_LINK": "https://baifa.io/reports/TBDJH4gK8Lp0Z/cash-flow", "RED_FLAG_ANALYSIS_LINK": "/reports/red_flag_analysis.pdf", "SMART": "人工智慧", "AUDITING_REPORTS": "監管報告",