feat:config Inicio configuração projeto

This commit is contained in:
Amadeu José Andrade Junior
2025-01-06 16:51:11 -03:00
parent 58e22f6935
commit af6a9795fd
4 changed files with 48 additions and 27 deletions

27
App.tsx
View File

@@ -1,10 +1,3 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import type {PropsWithChildren} from 'react';
import {
@@ -19,10 +12,7 @@ import {
import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
type SectionProps = PropsWithChildren<{
@@ -71,25 +61,10 @@ function App(): React.JSX.Element {
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
</Section>
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More">
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>

27
package-lock.json generated
View File

@@ -8,6 +8,7 @@
"name": "formbrickstest",
"version": "0.0.1",
"dependencies": {
"@formbricks/react-native": "^1.3.1",
"react": "18.3.1",
"react-native": "0.76.5"
},
@@ -2173,6 +2174,17 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@formbricks/react-native": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@formbricks/react-native/-/react-native-1.3.1.tgz",
"integrity": "sha512-OszKpP4xOLI3riv+L1N4aeBRorgTSHzzcE1ERrODf1led5v+bZQuiaogiPENV7IKgc0Ssqt49jp3Ut/8ep2i2A==",
"license": "MIT",
"peerDependencies": {
"react": ">=16.8.0",
"react-native": ">=0.60.0",
"react-native-webview": ">=13.0.0"
}
},
"node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
@@ -10836,6 +10848,21 @@
}
}
},
"node_modules/react-native-webview": {
"version": "13.12.5",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-13.12.5.tgz",
"integrity": "sha512-INOKPom4dFyzkbxbkuQNfeRG9/iYnyRDzrDkJeyvSWgJAW2IDdJkWFJBS2v0RxIL4gqLgHkiIZDOfiLaNnw83Q==",
"license": "MIT",
"peer": true,
"dependencies": {
"escape-string-regexp": "^4.0.0",
"invariant": "2.2.4"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
}
},
"node_modules/react-native/node_modules/ansi-styles": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",

View File

@@ -10,6 +10,7 @@
"test": "jest"
},
"dependencies": {
"@formbricks/react-native": "^1.3.1",
"react": "18.3.1",
"react-native": "0.76.5"
},
@@ -36,4 +37,4 @@
"engines": {
"node": ">=18"
}
}
}

View File

@@ -0,0 +1,18 @@
import React from "react";
import Formbricks from "@formbricks/react-native";
const config = {
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user-id>",
};
export default function App() {
return (
<>
{/* Your app content */}
<Formbricks initConfig={config} />
</>
);
}