Skip to content

Commit

Permalink
Merge pull request #253 from Nkgohil007/fix/fix_import_issue
Browse files Browse the repository at this point in the history
fix: resolve import issue for MixpanelMain
  • Loading branch information
zihejia committed May 14, 2024
2 parents 2f73630 + 1e058d4 commit 4677a84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import {Platform, NativeModules} from "react-native";
import packageJson from "./package.json";
const {MixpanelReactNative} = NativeModules;
import MixpanelMain from "mixpanel-react-native/javascript/mixpanel-main"

const DevicePlatform = {
Unknown: "Unknown",
Expand Down Expand Up @@ -55,7 +56,6 @@ export class Mixpanel {
);
}

const MixpanelMain = require("mixpanel-react-native/javascript/mixpanel-main");
this.mixpanelImpl = new MixpanelMain(token, trackAutomaticEvents, storage);
}

Expand Down

0 comments on commit 4677a84

Please sign in to comment.