* Fix channel and user list items * Fixes on members and create a dm lists * Fix tutorial and ipad * Fix test * Address feedback * Several fixes on Android * Fix tests * Address feedback * Add more non breaking strings --------- Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
33 lines
932 B
TypeScript
33 lines
932 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
|
|
import CustomStatusEmoji from '@components/custom_status/custom_status_emoji';
|
|
|
|
import type {EmojiCommonStyle} from '@typings/components/emoji';
|
|
import type {StyleProp} from 'react-native';
|
|
|
|
type Props = {
|
|
customStatus?: UserCustomStatus;
|
|
customStatusExpired: boolean;
|
|
isCustomStatusEnabled: boolean;
|
|
style: StyleProp<EmojiCommonStyle>;
|
|
}
|
|
|
|
const CustomStatus = ({customStatus, customStatusExpired, isCustomStatusEnabled, style}: Props) => {
|
|
const showCustomStatusEmoji = Boolean(isCustomStatusEnabled && customStatus?.emoji && !customStatusExpired);
|
|
|
|
if (!showCustomStatusEmoji) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<CustomStatusEmoji
|
|
customStatus={customStatus!}
|
|
style={style}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default CustomStatus;
|