-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
38 lines (33 loc) · 1021 Bytes
/
App.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
import React, { useState } from 'react';
import { SafeAreaView } from 'react-native';
import { State } from 'react-native-gesture-handler';
import { useValue } from 'react-native-reanimated';
import { Header } from './components/Header/Header';
import { Filter } from './components/Filter/Filter';
import { Content } from './components/Content/Content';
import { Footer } from './components/Footer/Footer';
export const App = () => {
const [item, setItem] = useState({
img: '',
title: '',
view: 0,
publisherName: '',
date: '',
publisherImg: ''
});
const state = useValue(State.UNDETERMINED);
const updateVideoUrl = itm => {
state.setValue(State.BEGAN);
setItem(itm)
}
return (
<SafeAreaView style={{ flex: 1 }}>
<Header />
<Filter />
<Content setVideo={updateVideoUrl} />
<Footer
state={state}
item={item} />
</SafeAreaView>
)
}