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,
|
||||
loading: customerLoading,
|
||||
} = useQuery(GET_CUSTOMER, {
|
||||
notifyOnNetworkStatusChange: true,
|
||||
variables: { customerId },
|
||||
skip: !customerId,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const MachineStatus = () => {
|
|||
data: machinesResponse,
|
||||
refetch,
|
||||
loading: machinesLoading,
|
||||
} = useQuery(GET_MACHINES)
|
||||
} = useQuery(GET_MACHINES, { notifyOnNetworkStatusChange: true })
|
||||
const { data: configResponse, configLoading } = useQuery(GET_DATA)
|
||||
const timezone = R.path(['config', 'locale_timezone'], configResponse)
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,11 @@ const GET_CUSTOM_REQUESTS = gql`
|
|||
|
||||
const Triggers = () => {
|
||||
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 } =
|
||||
useQuery(GET_CUSTOM_REQUESTS)
|
||||
const [error, setError] = useState(null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue