Style fix
This commit is contained in:
@@ -7,6 +7,7 @@ import React, { useEffect } from 'react';
|
||||
import { connect, DispatchProp } from 'dva';
|
||||
import { Spin, Input, Select, Icon, Button, message, Modal } from 'antd';
|
||||
import { formatMessage } from 'umi-plugin-locale';
|
||||
import _ from 'lodash';
|
||||
import { DrawModelState } from './model';
|
||||
import { PageState } from '@/types/common';
|
||||
import Header from '@/components/Header';
|
||||
@@ -99,7 +100,7 @@ const DrawPage: React.FC<DispatchProp & DrawModelState> = ({
|
||||
<Option
|
||||
key={it.id}
|
||||
value={it.id}
|
||||
>{it.label.toUpperCase()}</Option>
|
||||
>{(_.take(it.label, 4).join('')).toUpperCase()}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
@@ -2,20 +2,13 @@ import http from '@/utils/http';
|
||||
import _ from 'lodash';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { CoinDrawn, FundBasic } from '@/types/common';
|
||||
import { loadDrawCoins, storeDrawCoins } from '@/utils/storage';
|
||||
|
||||
export async function getCoins(): Promise<CoinDrawn[]> {
|
||||
const coinsCached = loadDrawCoins();
|
||||
if (coinsCached && coinsCached.length) {
|
||||
return coinsCached;
|
||||
}
|
||||
|
||||
const { ok, msg, data } = await http.get<CoinDrawn[]>('/fund/withdrawCoins');
|
||||
|
||||
if (!ok || !data) {
|
||||
throw Error(msg);
|
||||
}
|
||||
storeDrawCoins(data);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user