import React from 'react'; import { ScrollView, Text, TextStyle, TouchableHighlight, View, ViewStyle } from 'react-native'; import { Divider } from 'react-native-paper'; import { Edge } from 'react-native-safe-area-context'; import { useSelector } from 'react-redux'; import { IReduxState } from '../../../app/types'; import Avatar from '../../../base/avatar/components/Avatar'; import Icon from '../../../base/icons/components/Icon'; import { IconArrowRight } from '../../../base/icons/svg'; import JitsiScreen from '../../../base/modal/components/JitsiScreen'; import { getLocalParticipant } from '../../../base/participants/functions'; import { navigate } from '../../../mobile/navigation/components/settings/SettingsNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; import { shouldShowModeratorSettings } from '../../functions.native'; import AdvancedSection from './AdvancedSection'; import ConferenceSection from './ConferenceSection'; import GeneralSection from './GeneralSection'; import LinksSection from './LinksSection'; import ModeratorSection from './ModeratorSection'; import NotificationsSection from './NotificationsSection'; import { AVATAR_SIZE } from './constants'; import styles from './styles'; interface IProps { isInWelcomePage?: boolean | undefined; } const SettingsView = ({ isInWelcomePage }: IProps) => { const { displayName } = useSelector((state: IReduxState) => state['features/base/settings']); const localParticipant = useSelector((state: IReduxState) => getLocalParticipant(state)); const showModeratorSettings = useSelector((state: IReduxState) => shouldShowModeratorSettings(state)); const { visible } = useSelector((state: IReduxState) => state['features/settings']); const addBottomInset = !isInWelcomePage; const localParticipantId = localParticipant?.id; const scrollBounces = Boolean(isInWelcomePage); if (visible !== undefined && !visible) { return null; } return ( navigate(screen.settings.profile) }> { displayName } { isInWelcomePage && <> } { showModeratorSettings && <> } ); }; export default SettingsView;