import React, { useContext } from 'react'; import { Card, Layout, Text, useTheme } from '@ui-kitten/components'; import { User } from '../../Functions/DatabaseFunctions/Users'; import { StyleSheet } from 'react-native'; import UserAvatar from 'react-native-user-avatar'; import { AppContext } from '../../Contexts/AppContext'; interface NoteCardProps { user: User; } export const NoteCard: React.FC = ({ user }) => { const { goToPage } = useContext(AppContext); const theme = useTheme(); const styles = StyleSheet.create({ layout: { flex: 1, flexDirection: 'row', backgroundColor: 'transparent', }, profile: { flex: 1, width: 38, justifyContent: 'center', alignItems: 'center', backgroundColor: 'transparent', }, content: { flex: 5, backgroundColor: 'transparent', }, actions: { flex: 1, backgroundColor: 'transparent', }, }); return ( user && ( goToPage(`profile#${user.id}`)}> {user.name} {user.id} ) ); }; export default NoteCard;