feat(profile): show messenger connect success state
This commit is contained in:
@@ -13,12 +13,13 @@ type MessengerStartInput = {
|
||||
channel: MessengerChannel;
|
||||
baseUrl: string;
|
||||
email?: string;
|
||||
redirectPath?: string;
|
||||
};
|
||||
|
||||
export function useMessengerStart() {
|
||||
const pendingChannel = ref<MessengerChannel | null>(null);
|
||||
|
||||
async function openMessengerBot({ channel, baseUrl, email }: MessengerStartInput) {
|
||||
async function openMessengerBot({ channel, baseUrl, email, redirectPath }: MessengerStartInput) {
|
||||
pendingChannel.value = channel;
|
||||
|
||||
const payloadPromise = $fetch<MessengerStartResponse>('/api/auth/messenger-start', {
|
||||
@@ -26,6 +27,7 @@ export function useMessengerStart() {
|
||||
body: {
|
||||
channel,
|
||||
email,
|
||||
redirectPath,
|
||||
},
|
||||
});
|
||||
payloadPromise.finally(() => {
|
||||
|
||||
Reference in New Issue
Block a user