Skip to content

Commit

Permalink
refactor: don't repeat the same value in multiple places.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Aug 4, 2024
1 parent 61a5ac9 commit d96974c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/src/components/SettingsModal/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export const SettingsModal = ({ open, onClose }: SettingsModalProps) => {
const { t, i18n } = useTranslation();
const languages = ['en-US', 'fr-FR', 'pt-BR', 'zh-CN'];
const queue = useActiveQueue();
const pollingIntervals = queue?.readOnlyMode ? [-1] : allPollingIntervals;
const pollingIntervals = queue?.readOnlyMode
? allPollingIntervals.slice(0, 1)
: allPollingIntervals;

return (
<Modal width="small" open={open} onClose={onClose} title={t('SETTINGS.TITLE')}>
Expand Down

0 comments on commit d96974c

Please sign in to comment.