-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only create device if we got a expo push token
- Loading branch information
Showing
5 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
import { showToast } from "../components/Shared"; | ||
|
||
import { BACKEND_URL } from "../const"; | ||
|
||
import APIService from "@pushme-tgxn/pushmesdk"; | ||
|
||
const apiService = new APIService({ | ||
logging: (message, ...args) => { | ||
console.log(message, ...args); | ||
showToast(message); | ||
}, | ||
}); | ||
function createApiService() { | ||
const apiService = new APIService({ | ||
backendUrl: BACKEND_URL, | ||
// logging: (message) => { | ||
// console.log(message); | ||
// showToast(message); | ||
// }, | ||
}); | ||
console.log("createApiService", apiService.backendUrl); | ||
|
||
return apiService; | ||
} | ||
|
||
const apiService = createApiService(); | ||
export default apiService; |