import { StatusBar } from 'expo-status-bar'; import React, { useState, useEffect } from 'react'; import { View, Text, StyleSheet, SafeAreaView, FlatList } from 'react-native'; import { Card } from 'react-native-paper'; import API from '../API.js'; import Post from '../components/Post.js'; import Moment from 'moment'; import { useSnapshot } from 'valtio'; import GlobalState from '../contexts/GlobalState.js'; let NotificationsView = ({ navigation, route }) => { const gState = useSnapshot(GlobalState); const viewer = gState.me; const renderNotification = (({ item }) => { const gotToPost = () => { navigation.navigate('SinglePost', { postid: item.postid }); }; return ( {item.body} {" " + Moment(item.ts).fromNow()} ) }); return ( item.ts} /> ); } export default NotificationsView; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#edf2f7", }, });