-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
App.tsx
40 lines (36 loc) · 980 Bytes
/
App.tsx
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
39
40
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import SafeAreaView from 'react-native-safe-area-view';
import {
StreamApp,
FlatFeed,
Activity,
LikeButton,
StatusUpdateForm,
} from 'expo-activity-feed';
import config from './config';
function CustomActivity(props) {
return <Activity {...props} Footer={<LikeButton {...props} />} />;
}
function App() {
return (
<SafeAreaProvider>
<SafeAreaView style={{ flex: 1 }} forceInset={{ top: 'always' }}>
<StreamApp
apiKey={config.GETSTREAM_API_KEY}
appId={config.GETSTREAM_APP_ID}
token={config.GETSTREAM_API_TOKEN}
>
<FlatFeed
feedGroup="timeline"
userId="user-one"
Activity={CustomActivity}
notify
/>
<StatusUpdateForm feedGroup="timeline" />
</StreamApp>
</SafeAreaView>
</SafeAreaProvider>
);
}
export default App;