Skip to content

Commit 68dae06

Browse files
committed
prettier
1 parent 8d0752a commit 68dae06

1 file changed

Lines changed: 21 additions & 23 deletions

File tree

src/pages/workspace/tags/WorkspaceTagsPage.tsx

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import useLocalize from '@hooks/useLocalize';
2828
import useMobileSelectionMode from '@hooks/useMobileSelectionMode';
2929
import useNetwork from '@hooks/useNetwork';
3030
import useOnyx from '@hooks/useOnyx';
31-
3231
import usePolicy from '@hooks/usePolicy';
3332
import useResponsiveLayout from '@hooks/useResponsiveLayout';
3433
import useSearchBackPress from '@hooks/useSearchBackPress';
@@ -190,28 +189,27 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
190189
enabled: true,
191190
required: policyTagList.required,
192191
isDisabledCheckbox: isSwitchDisabled,
193-
rightElement:
194-
hasDependentTags ? (
195-
<ListItemRightCaretWithLabel
196-
labelText={translate('workspace.tags.tagCount', {count: Object.keys(policyTagList?.tags ?? {}).length})}
197-
shouldShowCaret
198-
/>
199-
) : (
200-
<Switch
201-
isOn={isSwitchEnabled}
202-
accessibilityLabel={translate('workspace.tags.requiresTag')}
203-
onToggle={(newValue: boolean) => {
204-
if (isMakingLastRequiredTagListOptional(policy, policyTags, [policyTagList])) {
205-
setIsCannotMakeLastTagOptionalModalVisible(true);
206-
return;
207-
}
208-
209-
updateWorkspaceRequiresTag(newValue, policyTagList.orderWeight);
210-
}}
211-
disabled={isSwitchDisabled}
212-
showLockIcon={isMakingLastRequiredTagListOptional(policy, policyTags, [policyTagList])}
213-
/>
214-
),
192+
rightElement: hasDependentTags ? (
193+
<ListItemRightCaretWithLabel
194+
labelText={translate('workspace.tags.tagCount', {count: Object.keys(policyTagList?.tags ?? {}).length})}
195+
shouldShowCaret
196+
/>
197+
) : (
198+
<Switch
199+
isOn={isSwitchEnabled}
200+
accessibilityLabel={translate('workspace.tags.requiresTag')}
201+
onToggle={(newValue: boolean) => {
202+
if (isMakingLastRequiredTagListOptional(policy, policyTags, [policyTagList])) {
203+
setIsCannotMakeLastTagOptionalModalVisible(true);
204+
return;
205+
}
206+
207+
updateWorkspaceRequiresTag(newValue, policyTagList.orderWeight);
208+
}}
209+
disabled={isSwitchDisabled}
210+
showLockIcon={isMakingLastRequiredTagListOptional(policy, policyTags, [policyTagList])}
211+
/>
212+
),
215213
};
216214
});
217215
}

0 commit comments

Comments
 (0)