diff --git a/example/package.json b/example/package.json index fb88cae9..7822d7d2 100644 --- a/example/package.json +++ b/example/package.json @@ -13,7 +13,7 @@ "cra-template-typescript": "1.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-onesignal": "3.0.0-beta.3", + "react-onesignal": "file:../", "react-scripts": "5.0.1", "typescript": "^4.9.5", "web-vitals": "^2.1.4" diff --git a/example/src/App.tsx b/example/src/App.tsx index 1ee91843..ada28b9c 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -8,9 +8,8 @@ function App() { appId: "f5d104e9-7462-4bf7-adc8-4ca501cb55b2", }).then(() => { OneSignal.Debug.setLogLevel('trace'); - // OneSignal.login("rodrigo"); - // OneSignal.User.addAlias("myAlias", "1"); - console.log(OneSignal.User.PushSubscription.token) + OneSignal.login("rodrigo"); + OneSignal.User.addAlias("myAlias", "1"); }); } catch (e) { console.log(e); diff --git a/example/yarn.lock b/example/yarn.lock index 5928650f..b823b468 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -7509,6 +7509,9 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +"react-onesignal@file:..": + version "3.0.0" + react-onesignal@3.0.0-beta.3: version "3.0.0-beta.3" resolved "https://registry.yarnpkg.com/react-onesignal/-/react-onesignal-3.0.0-beta.3.tgz#8e6533db26fd6547996a3fefffe267c451ce154e" diff --git a/index.ts b/index.ts index 2c8f048d..9f292028 100644 --- a/index.ts +++ b/index.ts @@ -110,7 +110,6 @@ const init = (options: IInitObject): Promise => { }); }; -type Action = (item: T) => void; interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; } interface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; } interface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }