Skip to content

Instantly share code, notes, and snippets.

@yuripramos
Last active July 11, 2020 15:57
Show Gist options
  • Save yuripramos/a50fc467b253f8779ae7f06bee6cbd9d to your computer and use it in GitHub Desktop.
Save yuripramos/a50fc467b253f8779ae7f06bee6cbd9d to your computer and use it in GitHub Desktop.
export const fetchSmallDevicesData = async (
resolution,
filters,
pages
) => {
const { data } = await axios.get(
`${URL}?${buildSmartDevicesParameters(
resolutions,
filters,
pages
)}`
);
return {
smallDevices: data
};
};
const { loading, data } = useFetch(
() => fetchSmallDevicesData(resolution, filters, pages),
[resolution, filters, pages]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment