mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
update
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { get_envelope } from '@/api/mailbox/envelope/api';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
export const useEnvelope = (
|
||||
accountId: number | undefined,
|
||||
envelopeId: string | undefined
|
||||
) => {
|
||||
return useQuery({
|
||||
queryKey: ['envelope', accountId, envelopeId],
|
||||
queryFn: () => get_envelope(accountId!, envelopeId!),
|
||||
enabled: !!accountId && !!envelopeId,
|
||||
staleTime: 10000,
|
||||
retry: false
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user