Skip to content

Commit

Permalink
fix: remove offline indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekChr committed Feb 26, 2024
1 parent e9cf472 commit 3fb6e98
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type {StackScreenProps} from '@react-navigation/stack';
import React from 'react';
import {View} from 'react-native';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import ScreenWrapper from '@components/ScreenWrapper';
import Switch from '@components/Switch';
import Text from '@components/Text';
Expand All @@ -13,7 +12,6 @@ import type {SettingsNavigatorParamList} from '@navigation/types';
import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper';
import PaidPolicyAccessOrNotFoundWrapper from '@pages/workspace/PaidPolicyAccessOrNotFoundWrapper';
import type SCREENS from '@src/SCREENS';
import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';

type WorkspaceCategoriesSettingsPageProps = StackScreenProps<SettingsNavigatorParamList, typeof SCREENS.WORKSPACE.CATEGORIES_SETTINGS>;

Expand All @@ -36,22 +34,16 @@ function WorkspaceCategoriesSettingsPage({route}: WorkspaceCategoriesSettingsPag
shouldShowOfflineIndicatorInWideScreen
>
<HeaderWithBackButton title={translate('common.settings')} />
<OfflineWithFeedback
errors={policy?.errorFields?.requiresCategory}
pendingAction={policy?.pendingFields?.requiresCategory as OnyxCommon.PendingAction}
errorRowStyles={styles.mh5}
>
<View style={[styles.mt2, styles.mh4]}>
<View style={[styles.flexRow, styles.mb5, styles.mr2, styles.alignItemsCenter, styles.justifyContentBetween]}>
<Text style={[styles.textNormal, styles.colorMuted]}>{translate('workspace.categories.requiresCategory')}</Text>
<Switch
isOn={policy?.requiresCategory ?? false}
accessibilityLabel={translate('workspace.categories.requiresCategory')}
onToggle={updateWorkspaceRequiresCategory}
/>
</View>
<View style={[styles.mt2, styles.mh4]}>
<View style={[styles.flexRow, styles.mb5, styles.mr2, styles.alignItemsCenter, styles.justifyContentBetween]}>
<Text style={[styles.textNormal, styles.colorMuted]}>{translate('workspace.categories.requiresCategory')}</Text>
<Switch
isOn={policy?.requiresCategory ?? false}
accessibilityLabel={translate('workspace.categories.requiresCategory')}
onToggle={updateWorkspaceRequiresCategory}
/>
</View>
</OfflineWithFeedback>
</View>
</ScreenWrapper>
)}
</PaidPolicyAccessOrNotFoundWrapper>
Expand Down

0 comments on commit 3fb6e98

Please sign in to comment.