Переглянути джерело

chore: prompt user if redemption code not input

JustSong 2 роки тому
батько
коміт
1cc7c20183
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      web/src/pages/TopUp/index.js

+ 2 - 1
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', {