mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
re-structure to monorepo.
This commit is contained in:
17
packages/webapp/src/hooks/query/jobs.tsx
Normal file
17
packages/webapp/src/hooks/query/jobs.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
// @ts-nocheck
|
||||
import { useRequestQuery } from '../useQueryRequest';
|
||||
|
||||
/**
|
||||
* Retrieve the job metadata.
|
||||
*/
|
||||
export function useJob(jobId, props = {}) {
|
||||
return useRequestQuery(
|
||||
['JOB', jobId],
|
||||
{ method: 'get', url: `jobs/${jobId}` },
|
||||
{
|
||||
select: (res) => res.data.job,
|
||||
defaultData: {},
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user