Apply suggestions from code review
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
parent
7106c1807b
commit
49272f0b72
9 changed files with 35 additions and 37 deletions
|
|
@ -4,11 +4,11 @@
|
|||
import React from 'react';
|
||||
import {useIntl} from 'react-intl';
|
||||
|
||||
import FloatingTextInput from '@app/components/floating_text_input_label';
|
||||
import {Channel} from '@app/constants';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {t} from '@app/i18n';
|
||||
import {getKeyboardAppearanceFromTheme} from '@app/utils/theme';
|
||||
import FloatingTextInput from '@components/floating_text_input_label';
|
||||
import {Channel} from '@constants';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {t} from '@i18n';
|
||||
import {getKeyboardAppearanceFromTheme} from '@utils/theme';
|
||||
|
||||
type Props = {
|
||||
error?: string;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
import React, {useEffect, useRef, useState} from 'react';
|
||||
|
||||
import {fetchChannelMemberships, getGroupMessageMembersCommonTeams} from '@actions/remote/channel';
|
||||
import {PER_PAGE_DEFAULT} from '@app/client/rest/constants';
|
||||
import {useServerUrl} from '@app/context/server';
|
||||
import {PER_PAGE_DEFAULT} from '@client/rest/constants';
|
||||
import {useServerUrl} from '@context/server';
|
||||
|
||||
import ConvertGMToChannelForm from './convert_gm_to_channel_form';
|
||||
import {Loader} from './loader';
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import {useIntl} from 'react-intl';
|
|||
import {View} from 'react-native';
|
||||
|
||||
import {convertGroupMessageToPrivateChannel, switchToChannelById} from '@actions/remote/channel';
|
||||
import {useServerUrl} from '@app/context/server';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {logError} from '@app/utils/log';
|
||||
import {makeStyleSheetFromTheme} from '@app/utils/theme';
|
||||
import {displayUsername} from '@app/utils/user';
|
||||
import {useServerUrl} from '@context/server';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {logError} from '@utils/log';
|
||||
import {makeStyleSheetFromTheme} from '@utils/theme';
|
||||
import {displayUsername} from '@utils/user';
|
||||
import Button from '@components/button';
|
||||
|
||||
import {ChannelNameInput} from '../channel_name_input';
|
||||
|
|
@ -122,9 +122,7 @@ export const ConvertGMToChannelForm = ({
|
|||
selectedTeamId={selectedTeam?.id}
|
||||
/>
|
||||
}
|
||||
<ChannelNameInput
|
||||
onChange={setNewChannelName}
|
||||
/>
|
||||
<ChannelNameInput onChange={setNewChannelName}/>
|
||||
<Button
|
||||
onPress={handleOnPress}
|
||||
text={confirmButtonText}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {switchMap, distinctUntilChanged} from '@nozbe/watermelondb/utils/rx';
|
|||
import withObservables from '@nozbe/with-observables';
|
||||
import {of as of$} from 'rxjs';
|
||||
|
||||
import {observeCurrentUser, observeTeammateNameDisplay} from '@app/queries/servers/user';
|
||||
import {observeCurrentUser, observeTeammateNameDisplay} from '@queries/servers/user';
|
||||
|
||||
import {ConvertGMToChannelForm} from './convert_gm_to_channel_form';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ import React, {useCallback} from 'react';
|
|||
import {useIntl} from 'react-intl';
|
||||
import {View, type ViewStyle} from 'react-native';
|
||||
|
||||
import Button from '@app/components/button';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {popTopScreen} from '@app/screens/navigation';
|
||||
import Button from '@components/button';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {popTopScreen} from '@screens/navigation';
|
||||
|
||||
import MessageBox from '../message_box/message_box';
|
||||
import MessageBox from '../message_box';
|
||||
|
||||
type Props = {
|
||||
containerStyles: ViewStyle;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
import {withDatabase} from '@nozbe/watermelondb/DatabaseProvider';
|
||||
import withObservables from '@nozbe/with-observables';
|
||||
|
||||
import {observeCurrentUserId} from '@app/queries/servers/system';
|
||||
import {observeTeammateNameDisplay} from '@app/queries/servers/user';
|
||||
import {observeCurrentUserId} from '@queries/servers/system';
|
||||
import {observeTeammateNameDisplay} from '@queries/servers/user';
|
||||
|
||||
import ConvertGMToChannel from './convert_gm_to_channel';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import React from 'react';
|
|||
import {Text, View} from 'react-native';
|
||||
|
||||
import CompassIcon from '@app/components/compass_icon';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from '@app/utils/theme';
|
||||
import {typography} from '@app/utils/typography';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
|
||||
import {typography} from '@utils/typography';
|
||||
|
||||
type MessageBoxTypes = 'default' | 'danger'
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import React, {useCallback, useEffect, useState} from 'react';
|
|||
import {useIntl} from 'react-intl';
|
||||
import {Platform} from 'react-native';
|
||||
|
||||
import OptionItem from '@app/components/option_item';
|
||||
import {Screens} from '@app/constants';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {dismissBottomSheet, goToScreen} from '@app/screens/navigation';
|
||||
import {preventDoubleTap} from '@app/utils/tap';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from '@app/utils/theme';
|
||||
import OptionItem from '@components/option_item';
|
||||
import {Screens} from '@constants';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {dismissBottomSheet, goToScreen} from '@screens/navigation';
|
||||
import {preventDoubleTap} from '@utils/tap';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
|
||||
|
||||
const getStyleFromTheme = makeStyleSheetFromTheme((theme: Theme) => {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@
|
|||
import React, {useCallback, useMemo, useState} from 'react';
|
||||
import {View} from 'react-native';
|
||||
|
||||
import TeamList from '@app/components/team_list';
|
||||
import {useTheme} from '@app/context/theme';
|
||||
import {popTopScreen} from '@app/screens/navigation';
|
||||
import {changeOpacity, getKeyboardAppearanceFromTheme, makeStyleSheetFromTheme} from '@app/utils/theme';
|
||||
import SearchBar from '@components/search';
|
||||
import TeamList from '@components/team_list';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {popTopScreen} from '@screens/navigation';
|
||||
import {changeOpacity, getKeyboardAppearanceFromTheme, makeStyleSheetFromTheme} from '@utils/theme';
|
||||
|
||||
const getStyleSheet = makeStyleSheetFromTheme(() => ({
|
||||
const style = StyleSheet.create({
|
||||
container: {
|
||||
padding: 12,
|
||||
},
|
||||
listContainer: {
|
||||
marginTop: 12,
|
||||
},
|
||||
}));
|
||||
});
|
||||
|
||||
type Props = {
|
||||
teams: Team[];
|
||||
|
|
|
|||
Loading…
Reference in a new issue