PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0-beta1
Elementor Website Builder – more than just a page builder v3.8.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
elementor / app / modules / kit-library / assets / js / hooks / use-download-link-mutation.js

use-download-link-mutation.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at app/modules/kit-library/assets/js/hooks/use-download-link-mutation.js

15 lines 368 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { useCallback } from 'react';
2 import { useMutation } from 'react-query';
3
4 export default function useDownloadLinkMutation( model, { onError, onSuccess } ) {
5 const downloadLink = useCallback(
6 () => $e.data.get( 'kits/download-link', { id: model.id }, { refresh: true } ),
7 [ model ],
8 );
9
10 return useMutation(
11 downloadLink,
12 { onSuccess, onError },
13 );
14 }
15