fix: Add markdown to Directory descriptions (#5399)

Signed-off-by: brf153 <153hsb@gmail.com>
This commit is contained in:
Devaansh Bhandari 2023-12-18 23:52:46 +05:30 committed by GitHub
parent 7934141d31
commit 3e9ab8877c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import RoomTypeIcon from '../RoomTypeIcon';
import styles, { ROW_HEIGHT } from './styles'; import styles, { ROW_HEIGHT } from './styles';
import { themes } from '../../lib/constants'; import { themes } from '../../lib/constants';
import { TSupportedThemes, useTheme } from '../../theme'; import { TSupportedThemes, useTheme } from '../../theme';
import { MarkdownPreview } from '../markdown';
export { ROW_HEIGHT }; export { ROW_HEIGHT };
@ -60,9 +61,11 @@ const DirectoryItem = ({
</Text> </Text>
</View> </View>
{description ? ( {description ? (
<Text style={[styles.directoryItemUsername, { color: themes[theme].auxiliaryText }]} numberOfLines={1}> <MarkdownPreview
{description} msg={description}
</Text> style={[styles.directoryItemUsername, { color: themes[theme].auxiliaryText }]}
numberOfLines={1}
/>
) : null} ) : null}
</View> </View>
<DirectoryItemLabel text={rightLabel} theme={theme} /> <DirectoryItemLabel text={rightLabel} theme={theme} />