fix: make sure loading is true when refetching
This commit is contained in:
parent
f1e5edd4ac
commit
268f2d68fd
3 changed files with 7 additions and 2 deletions
|
|
@ -296,6 +296,7 @@ const CustomerProfile = memo(() => {
|
||||||
refetch: getCustomer,
|
refetch: getCustomer,
|
||||||
loading: customerLoading,
|
loading: customerLoading,
|
||||||
} = useQuery(GET_CUSTOMER, {
|
} = useQuery(GET_CUSTOMER, {
|
||||||
|
notifyOnNetworkStatusChange: true,
|
||||||
variables: { customerId },
|
variables: { customerId },
|
||||||
skip: !customerId,
|
skip: !customerId,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ const MachineStatus = () => {
|
||||||
data: machinesResponse,
|
data: machinesResponse,
|
||||||
refetch,
|
refetch,
|
||||||
loading: machinesLoading,
|
loading: machinesLoading,
|
||||||
} = useQuery(GET_MACHINES)
|
} = useQuery(GET_MACHINES, { notifyOnNetworkStatusChange: true })
|
||||||
const { data: configResponse, configLoading } = useQuery(GET_DATA)
|
const { data: configResponse, configLoading } = useQuery(GET_DATA)
|
||||||
const timezone = R.path(['config', 'locale_timezone'], configResponse)
|
const timezone = R.path(['config', 'locale_timezone'], configResponse)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,11 @@ const GET_CUSTOM_REQUESTS = gql`
|
||||||
|
|
||||||
const Triggers = () => {
|
const Triggers = () => {
|
||||||
const [wizardType, setWizard] = useState(false)
|
const [wizardType, setWizard] = useState(false)
|
||||||
const { data, loading: configLoading, refetch } = useQuery(GET_CONFIG)
|
const {
|
||||||
|
data,
|
||||||
|
loading: configLoading,
|
||||||
|
refetch,
|
||||||
|
} = useQuery(GET_CONFIG, { notifyOnNetworkStatusChange: true })
|
||||||
const { data: customInfoReqData, loading: customInfoLoading } =
|
const { data: customInfoReqData, loading: customInfoLoading } =
|
||||||
useQuery(GET_CUSTOM_REQUESTS)
|
useQuery(GET_CUSTOM_REQUESTS)
|
||||||
const [error, setError] = useState(null)
|
const [error, setError] = useState(null)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue