From 1cc7c20183ccc445113370e8a3aee9ec8b0a67ae Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 21 May 2023 10:32:47 +0800 Subject: [PATCH] chore: prompt user if redemption code not input --- web/src/pages/TopUp/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/pages/TopUp/index.js b/web/src/pages/TopUp/index.js index 9c4506a3..b710b14e 100644 --- a/web/src/pages/TopUp/index.js +++ b/web/src/pages/TopUp/index.js @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; import { Button, Form, Grid, Header, Segment, Statistic } from 'semantic-ui-react'; -import { API, showError, showSuccess } from '../../helpers'; +import { API, showError, showInfo, showSuccess } from '../../helpers'; const TopUp = () => { const [redemptionCode, setRedemptionCode] = useState(''); @@ -9,6 +9,7 @@ const TopUp = () => { const topUp = async () => { if (redemptionCode === '') { + showInfo('请输入充值码!') return; } const res = await API.post('/api/user/topup', {