fix: add loading flag to commission list
This commit is contained in:
parent
070e9155a7
commit
49ea028805
2 changed files with 4 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ const Commissions = ({ name: SCREEN_KEY }) => {
|
|||
const classes = useStyles()
|
||||
const [showMachines, setShowMachines] = useState(false)
|
||||
const [error, setError] = useState(null)
|
||||
const { data } = useQuery(GET_DATA)
|
||||
const { data, loading } = useQuery(GET_DATA)
|
||||
const [saveConfig] = useMutation(SAVE_CONFIG, {
|
||||
refetchQueries: () => ['getData'],
|
||||
onError: error => setError(error)
|
||||
|
|
@ -118,7 +118,7 @@ const Commissions = ({ name: SCREEN_KEY }) => {
|
|||
iconClassName={classes.listViewButton}
|
||||
/>
|
||||
|
||||
{!showMachines && (
|
||||
{!showMachines && !loading && (
|
||||
<CommissionsDetails
|
||||
config={config}
|
||||
locale={localeConfig}
|
||||
|
|
@ -130,7 +130,7 @@ const Commissions = ({ name: SCREEN_KEY }) => {
|
|||
classes={classes}
|
||||
/>
|
||||
)}
|
||||
{showMachines && (
|
||||
{showMachines && !loading && (
|
||||
<CommissionsList
|
||||
config={config}
|
||||
localeConfig={localeConfig}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ const CommissionsList = memo(
|
|||
const [coinFilter, setCoinFilter] = useState(SHOW_ALL)
|
||||
const [orderProp, setOrderProp] = useState(ORDER_OPTIONS[0])
|
||||
|
||||
const coins = R.prop('cryptoCurrencies', localeConfig)
|
||||
const coins = R.prop('cryptoCurrencies', localeConfig) ?? []
|
||||
|
||||
const getMachineCoins = deviceId => {
|
||||
const override = R.prop('overrides', localeConfig)?.find(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue