This commit is contained in:
rustmailer
2026-04-20 00:12:18 +08:00
parent 7dd722f9b8
commit b29c6ea9ff
55 changed files with 315 additions and 1515 deletions
+15
View File
@@ -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
});
};