|
@@ -2,7 +2,6 @@ import React, { useState } from 'react';
|
|
|
import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native';
|
|
|
import ActionSheet, { SheetManager } from 'react-native-actions-sheet';
|
|
|
import { Colors } from 'src/theme';
|
|
|
-import { Ionicons } from '@expo/vector-icons';
|
|
|
import { API_HOST } from 'src/constants';
|
|
|
import { getFontSize } from 'src/utils';
|
|
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
@@ -11,6 +10,9 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
import { NAVIGATION_PAGES } from 'src/types';
|
|
|
import { usePostSetBlockMutation, usePostSetMuteMutation } from '@api/chat';
|
|
|
import { useChatStore } from 'src/stores/chatStore';
|
|
|
+import TrashIcon from 'assets/icons/travels-screens/trash-solid.svg';
|
|
|
+import BanIcon from 'assets/icons/messages/ban.svg';
|
|
|
+import BellSlashIcon from 'assets/icons/messages/bell-slash.svg';
|
|
|
|
|
|
const MoreModal = () => {
|
|
|
const insets = useSafeAreaInsets();
|
|
@@ -95,11 +97,12 @@ const MoreModal = () => {
|
|
|
<View style={[styles.container, { paddingBottom: 8 + insets.bottom }]}>
|
|
|
<TouchableOpacity
|
|
|
style={styles.header}
|
|
|
- onPress={() =>
|
|
|
+ onPress={() => {
|
|
|
+ SheetManager.hide('more-modal');
|
|
|
navigation.navigate(
|
|
|
...([NAVIGATION_PAGES.PUBLIC_PROFILE_VIEW, { userId: chatData.uid }] as never)
|
|
|
- )
|
|
|
- }
|
|
|
+ );
|
|
|
+ }}
|
|
|
>
|
|
|
<Image source={{ uri: API_HOST + chatData?.avatar }} style={styles.avatar} />
|
|
|
<Text style={styles.name}>{chatData.name}</Text>
|
|
@@ -108,19 +111,19 @@ const MoreModal = () => {
|
|
|
<View style={styles.optionsContainer}>
|
|
|
<TouchableOpacity style={styles.option} onPress={handleMute}>
|
|
|
<Text style={styles.optionText}>{chatData.muted === 1 ? 'Unmute' : 'Mute'}</Text>
|
|
|
- <Ionicons name="notifications-off-outline" size={18} color={Colors.DARK_BLUE} />
|
|
|
+ <BellSlashIcon fill={Colors.DARK_BLUE} />
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
|
|
|
<View style={[styles.optionsContainer, { paddingVertical: 0, gap: 0 }]}>
|
|
|
<TouchableOpacity style={[styles.option, styles.dangerOption]}>
|
|
|
<Text style={[styles.optionText, styles.dangerText]}>Block {chatData.name}</Text>
|
|
|
- <Ionicons name="ban-outline" size={18} color={Colors.RED} />
|
|
|
+ <BanIcon fill={Colors.RED} />
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
<TouchableOpacity style={[styles.option, styles.dangerOption]} onPress={handleDelete}>
|
|
|
<Text style={[styles.optionText, styles.dangerText]}>Delete chat</Text>
|
|
|
- <Ionicons name="trash-outline" size={18} color={Colors.RED} />
|
|
|
+ <TrashIcon fill={Colors.RED} width={18} height={18} />
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
</View>
|