Skip to content

Commit

Permalink
fix(inbox): integrations loading bug when create
Browse files Browse the repository at this point in the history
  • Loading branch information
Anu-Ujin committed Dec 11, 2023
1 parent 2a53763 commit b0e44da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -226,11 +226,15 @@ class CreateMessenger extends React.Component<Props, State> {

if (messengerApps.websites && messengerApps.websites.length > 0) {
for (const website of messengerApps.websites) {
if (website.url === '') return Alert.error(`Set Website URL`);
if (website.description === '')
if (website.url === '') {
return Alert.error(`Set Website URL`);
}
if (website.description === '') {
return Alert.error(`Set Website Description`);
if (website.buttonText === '')
}
if (website.buttonText === '') {
return Alert.error(`Set Website Button Text`);
}
}
}

Expand Down
Expand Up @@ -79,13 +79,13 @@ const CreateMessenger = (props: FinalProps) => {
messengerApps
} = doc;

setIsLoading(true);

let id = '';
saveMessengerMutation({
variables: { name, brandId, languageCode, channelIds }
})
.then(({ data }) => {
setIsLoading(true);

const integrationId = data.integrationsCreateMessengerIntegration._id;
id = integrationId;
return saveConfigsMutation({
Expand Down

0 comments on commit b0e44da

Please sign in to comment.