Skip to content

Commit e493730

Browse files
committed
Refactor OneTrust example app config
1 parent b7f1c09 commit e493730

3 files changed

Lines changed: 24 additions & 42 deletions

File tree

examples/onetrust/src/App.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import { ContentpassSdkProvider } from '@contentpass/react-native-contentpass';
55
import { ContentpassConsentGate } from '@contentpass/react-native-contentpass-ui';
66
import type { CmpAdapter } from '@contentpass/react-native-contentpass';
77
import { createOnetrustCmpAdapter } from '@contentpass/react-native-contentpass-cmp-onetrust';
8-
import { contentpassConfigTesting as contentpassConfig } from './contentpassConfig';
8+
import {
9+
CONTENTPASS_CONFIG,
10+
ONETRUST_CDN_LOCATION,
11+
ONETRUST_APP_ID,
12+
ONETRUST_LANGUAGE_CODE,
13+
} from './Config';
914
import Content from './Content';
1015

11-
const ONETRUST_CDN_LOCATION = 'cdn.cookielaw.org';
12-
const ONETRUST_APP_ID = '019beb25-2008-72e0-8788-da1eec1f18dc-test';
13-
const ONETRUST_LANGUAGE_CODE = 'en';
14-
1516
const styles = StyleSheet.create({
1617
container: {
1718
flex: 1,
@@ -72,10 +73,10 @@ export default function App() {
7273
}
7374

7475
return (
75-
<ContentpassSdkProvider contentpassConfig={contentpassConfig}>
76+
<ContentpassSdkProvider contentpassConfig={CONTENTPASS_CONFIG}>
7677
<ContentpassConsentGate
7778
cmpAdapter={cmpAdapter!}
78-
contentpassConfig={contentpassConfig}
79+
contentpassConfig={CONTENTPASS_CONFIG}
7980
hideAppWhenVisible={false}
8081
>
8182
<View style={styles.container}>

examples/onetrust/src/Config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { ContentpassConfig } from '@contentpass/react-native-contentpass';
2+
3+
export const CONTENTPASS_CONFIG: ContentpassConfig = {
4+
// Testing app
5+
propertyId: '78da2fd3-8b25-4642-b7b7-4a0193d00f89',
6+
planId: '50abfd7f-8a5d-43c9-8a8c-0cb4b0cefe96',
7+
issuer: 'https://my.contentpass.io',
8+
apiUrl: 'https://cp.cmp-onetrust.contenttimes.io',
9+
samplingRate: 1,
10+
redirectUrl: 'de.contentpass.demo://oauth',
11+
logLevel: 'debug',
12+
};
13+
14+
export const ONETRUST_CDN_LOCATION = 'cdn.cookielaw.org';
15+
export const ONETRUST_APP_ID = '019beb25-2008-72e0-8788-da1eec1f18dc-test';
16+
export const ONETRUST_LANGUAGE_CODE = 'en';

examples/onetrust/src/contentpassConfig.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)