-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
25 lines (20 loc) · 578 Bytes
/
App.tsx
File metadata and controls
25 lines (20 loc) · 578 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React, { useEffect, useRef } from 'react';
import { View } from 'react-native';
import Home from './src/Screens/Home/.';
const App: React.FC = () => {
const cameraRef = useRef<CameraComponent>(null);
useEffect(() => {
const interval = setInterval(() => {
if (cameraRef.current) {
cameraRef.current.takePicture();
}
}, 10 * 1000); // Change 10 to the number of seconds for the interval
return () => clearInterval(interval);
}, []);
return (
<View style={{ flex: 1 }}>
<Home />
</View>
);
};
export default App;