mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: style tweaks to upload attachments popover
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
import { useMutation } from 'react-query';
|
||||
import useApiRequest from '../useRequest';
|
||||
|
||||
const commonInvalidateQueries = (query) => {
|
||||
// Invalidate accounts.
|
||||
};
|
||||
|
||||
/**
|
||||
* Uploads the given attachments.
|
||||
*/
|
||||
@@ -29,3 +25,18 @@ export function useDeleteAttachment(props) {
|
||||
props,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uploads the given attachments.
|
||||
*/
|
||||
export function useGetPresignedUrlAttachment(props) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
(key: string) =>
|
||||
apiRequest
|
||||
.get(`/attachments/${key}/presigned-url`)
|
||||
.then((res) => res.data),
|
||||
props,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user