feat: style tweaks to upload attachments popover

This commit is contained in:
Ahmed Bouhuolia
2024-05-29 19:03:21 +02:00
parent ceb133e29a
commit 6e50de1d28
5 changed files with 97 additions and 41 deletions

View File

@@ -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,
);
}