forked from Ivasoft/mattermost-mobile
* User avatar stack * Fixed fetchPostThread & added observer * Reusing the user component * Refactor fix * fix lint Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
31 lines
701 B
TypeScript
31 lines
701 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {StyleProp, View, ViewStyle} from 'react-native';
|
|
|
|
import ProfilePicture from '@components/profile_picture/image';
|
|
|
|
import type UserModel from '@typings/database/models/servers/user';
|
|
|
|
export type Props = {
|
|
style: StyleProp<ViewStyle>;
|
|
user: UserModel;
|
|
};
|
|
|
|
const UserAvatar = ({style, user}: Props) => {
|
|
return (
|
|
<View
|
|
key={user.id}
|
|
style={style}
|
|
>
|
|
<ProfilePicture
|
|
author={user}
|
|
size={24}
|
|
/>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export default UserAvatar;
|