// App.js (Updated) import React from 'react'; import { StyleSheet, Text, View,…
- User
// App.js (Updated)
import React from 'react'; import { StyleSheet, Text, View, ScrollView, Alert } from 'react-native'; import usePermissions from './hooks/usePermissions'; import PhotoCapture from './components/PhotoCapture'; import VideoRecording from './components/VideoRecording'; import VoiceRecording from './components/VoiceRecording'; import PDFGenerator from './components/PDFGenerator'; import { MediaProvider } from './context/MediaContext';
const App = () => { const { hasCameraPermission, hasAudioPermission } = usePermissions();
if (hasCameraPermission === null || hasAudioPermission === null) { return ; }
if (!hasCameraPermission || !hasAudioPermission) { return ( No access to camera or microphone. Please enable permissions in your device settings. ); }
return ( {/* --- Legal Text Display --- */} Legal Information {legalText}
code{/* --- Photo Capture Section --- */} <PhotoCapture /> {/* --- Video Recording Section --- */} <VideoRecording /> {/* --- Voice Recording Section --- */} <VoiceRecording /> {/* --- PDF Generation Section --- */} <PDFGenerator /> </ScrollView> </MediaProvider>); };
// --- Legal Text --- const legalText = `YOUR LEGAL TEXT GOES HERE...
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel turpis at quam aliquet lobortis. Integer sit amet ligula vitae justo commodo fermentum. Donec vitae massa a augue blandit porttitor. Proin id purus nec justo mollis finibus sit amet at justo. Mauris ac sem vitae nisl interdum interdum.`;
const styles = StyleSheet.create({ container: { padding: 20, paddingBottom: 40, backgroundColor: '#f5f5f5', }, loadingContainer: { flex: 1, }, permissionContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', }, permissionText: { fontSize: 16, textAlign: 'center', marginHorizontal: 20, }, header: { fontSize: 24, fontWeight: 'bold', marginBottom: 10, }, legalText: { fontSize: 16, marginBottom: 20, lineHeight: 22, }, });
export default App;
app should use the text from this file to get the legaltext import React from 'react'; import { ScrollView, Text, StyleSheet } from 'react-native';
const LegalText = () => { return ( Lorem ipsum dolor sit amet, consectetur adipiscing elit. ... ); };
const styles = StyleSheet.create({ container: { padding: 20, }, text: { fontSize: 16, }, });
export default LegalText;
- Assistant