Skip to content

Commit 552c160

Browse files
committed
Formatted JS files
1 parent 1939e81 commit 552c160

File tree

2 files changed

+173
-140
lines changed

2 files changed

+173
-140
lines changed

example/src/App.tsx

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ export default function App() {
179179
title="Login unidentified User"
180180
onPress={() => {
181181
Intercom.loginUnidentifiedUser()
182-
.then(() => {
183-
console.log("logged in")
184-
setLoggedUser(true);
185-
AsyncStorage.setItem(AUTK_KEY, 'true');
186-
})
187-
.catch((e) => {
188-
showErrorAlert(e);
189-
console.error(e);
190-
});
182+
.then(() => {
183+
console.log('logged in');
184+
setLoggedUser(true);
185+
AsyncStorage.setItem(AUTK_KEY, 'true');
186+
})
187+
.catch((e) => {
188+
showErrorAlert(e);
189+
console.error(e);
190+
});
191191
}}
192192
/>
193193
<Input
@@ -207,14 +207,15 @@ export default function App() {
207207
title="Login identified User"
208208
onPress={() => {
209209
if (user.email?.includes('@')) {
210-
Intercom.loginUserWithUserAttributes(user).then(() => {
211-
AsyncStorage.setItem(AUTK_KEY, user.email ?? '');
212-
setLoggedUser(true);
213-
})
214-
.catch((e) => {
215-
showErrorAlert(e);
216-
console.error(e);
217-
});
210+
Intercom.loginUserWithUserAttributes(user)
211+
.then(() => {
212+
AsyncStorage.setItem(AUTK_KEY, user.email ?? '');
213+
setLoggedUser(true);
214+
})
215+
.catch((e) => {
216+
showErrorAlert(e);
217+
console.error(e);
218+
});
218219
} else {
219220
showEmptyAlertMessage('Email');
220221
}
@@ -243,7 +244,8 @@ export default function App() {
243244
title="Display Article"
244245
onPress={() => {
245246
if (articleId) {
246-
let articleContent = IntercomContent.articleWithArticleId(articleId);
247+
let articleContent =
248+
IntercomContent.articleWithArticleId(articleId);
247249
Intercom.presentContent(articleContent);
248250
} else {
249251
showEmptyAlertMessage('Article id');
@@ -279,7 +281,8 @@ export default function App() {
279281
disabled={!loggedUser}
280282
title={'Display Help Center Collections'}
281283
onPress={() => {
282-
let helpCenterCollectionsContent = IntercomContent.helpCenterCollectionsWithIds(COLLECTIONS);
284+
let helpCenterCollectionsContent =
285+
IntercomContent.helpCenterCollectionsWithIds(COLLECTIONS);
283286
Intercom.presentContent(helpCenterCollectionsContent);
284287
}}
285288
/>
@@ -343,7 +346,6 @@ export default function App() {
343346
title="Search Help Center"
344347
onPress={() => {
345348
if (searchTerm) {
346-
347349
Intercom.searchHelpCenter(searchTerm)
348350
.then((item) => {
349351
console.log(item);
@@ -373,7 +375,8 @@ export default function App() {
373375
title={'Display Carousel'}
374376
onPress={() => {
375377
if (carouselId) {
376-
let carouselContent = IntercomContent.carouselWithCarouselId(carouselId);
378+
let carouselContent =
379+
IntercomContent.carouselWithCarouselId(carouselId);
377380
Intercom.presentContent(carouselContent);
378381
} else {
379382
showEmptyAlertMessage('Carousel Id');
@@ -487,14 +490,14 @@ export default function App() {
487490
onPress={() => {
488491
if (userName) {
489492
Intercom.updateUser({ name: userName })
490-
.then(() => {
491-
console.log("lupdated User");
492-
showResponseAlert("Updated User");
493-
})
494-
.catch((e) => {
495-
showErrorAlert(e);
496-
console.error(e);
497-
});
493+
.then(() => {
494+
console.log('lupdated User');
495+
showResponseAlert('Updated User');
496+
})
497+
.catch((e) => {
498+
showErrorAlert(e);
499+
console.error(e);
500+
});
498501
} else {
499502
showEmptyAlertMessage('User Name');
500503
}

0 commit comments

Comments
 (0)