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