feat: SMTP Driver Integration (#12993)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@ -1,11 +1,21 @@
|
||||
import { useGetConnectedImapSmtpCaldavAccountQuery } from '~/generated-metadata/graphql';
|
||||
import {
|
||||
type GetConnectedImapSmtpCaldavAccountQuery,
|
||||
useGetConnectedImapSmtpCaldavAccountQuery,
|
||||
} from '~/generated-metadata/graphql';
|
||||
|
||||
export type ConnectedImapSmtpCaldavAccount =
|
||||
GetConnectedImapSmtpCaldavAccountQuery['getConnectedImapSmtpCaldavAccount'];
|
||||
|
||||
export const useConnectedImapSmtpCaldavAccount = (
|
||||
connectedAccountId: string | undefined,
|
||||
onCompleted?: (data: ConnectedImapSmtpCaldavAccount) => void,
|
||||
) => {
|
||||
const { data, loading, error } = useGetConnectedImapSmtpCaldavAccountQuery({
|
||||
variables: { id: connectedAccountId ?? '' },
|
||||
skip: !connectedAccountId,
|
||||
onCompleted: (data) => {
|
||||
onCompleted?.(data.getConnectedImapSmtpCaldavAccount);
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user