Skip to content

Commit 3b492f5

Browse files
authored
Update README.md
Update full example to resolve error regarding: import { SPConsentManager, SPCampaignEnvironment } from '@sourcepoint/react-native-cmp'; Resolve syntax error in full example for onAction
1 parent 3587593 commit 3b492f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ In the example below, you can find a fully configured example in React:
174174
import React, { useState, useEffect, useRef } from 'react';
175175
import { View, Text, SafeAreaView } from 'react-native';
176176

177-
import { SPConsentManager, SPCampaignEnvironment } from '@sourcepoint/react-native-cmp';
177+
import SPConsentManager, { SPCampaignEnvironment, SPUserData } from '@sourcepoint/react-native-cmp';
178178

179179
export default function App() {
180180
const [userData, setUserData] = useState<SPUserData>({});
@@ -206,8 +206,8 @@ export default function App() {
206206
consentManager.current?.onFinished(() => {
207207
consentManager.current?.getUserData().then(setUserData);
208208
});
209-
consentManager.current?.onAction(({ actionType }) =>
210-
console.log(`User took action ${actionType}`)
209+
consentManager.current?.onAction(({ actionType }) => {
210+
console.log(`User took action ${actionType}`)
211211
});
212212
consentManager.current?.onError(console.error)
213213

0 commit comments

Comments
 (0)