Rocket.Chat.ReactNative/app/views/RoomView/List/components/EmptyRoom.tsx

21 lines
513 B
TypeScript
Raw Normal View History

2019-03-27 20:06:57 +00:00
import React from 'react';
import { ImageBackground, StyleSheet } from 'react-native';
import { useTheme } from '../../../../theme';
2019-03-27 20:06:57 +00:00
const styles = StyleSheet.create({
image: {
width: '100%',
height: '100%',
position: 'absolute'
}
});
export const EmptyRoom = React.memo(({ length, rid }: { length: number; rid: string }) => {
const { theme } = useTheme();
if (length === 0 || !rid) {
return <ImageBackground source={{ uri: `message_empty_${theme}` }} style={styles.image} />;
2019-03-27 20:06:57 +00:00
}
return null;
});