diff options
author | 2023-05-28 13:48:21 +0530 | |
---|---|---|
committer | 2023-05-28 13:48:21 +0530 | |
commit | 99ca310c73024b51fed1f3077375eed7827f2c20 (patch) | |
tree | 2bd15986f448129a2291acba90ccc6bf68a233e0 /src/features/workspaces/components | |
parent | Disable in-app auto-updates for portable windows installation (fixes #1088) (... (diff) | |
download | ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.gz ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.tar.zst ferdium-app-99ca310c73024b51fed1f3077375eed7827f2c20.zip |
Fix issues reported by sonarqube linter
Diffstat (limited to 'src/features/workspaces/components')
4 files changed, 12 insertions, 10 deletions
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.tsx b/src/features/workspaces/components/WorkspaceDrawerItem.tsx index 0ad56d1ae..74ca2797d 100644 --- a/src/features/workspaces/components/WorkspaceDrawerItem.tsx +++ b/src/features/workspaces/components/WorkspaceDrawerItem.tsx | |||
@@ -19,10 +19,11 @@ const messages = defineMessages({ | |||
19 | }, | 19 | }, |
20 | }); | 20 | }); |
21 | 21 | ||
22 | const itemTransition = | 22 | const itemTransition = window?.matchMedia( |
23 | window && window.matchMedia('(prefers-reduced-motion: no-preference)') | 23 | '(prefers-reduced-motion: no-preference)', |
24 | ? 'background-color 300ms ease-out' | 24 | ) |
25 | : 'none'; | 25 | ? 'background-color 300ms ease-out' |
26 | : 'none'; | ||
26 | 27 | ||
27 | const styles = theme => ({ | 28 | const styles = theme => ({ |
28 | item: { | 29 | item: { |
diff --git a/src/features/workspaces/components/WorkspaceItem.tsx b/src/features/workspaces/components/WorkspaceItem.tsx index b097a8298..6c4dd649b 100644 --- a/src/features/workspaces/components/WorkspaceItem.tsx +++ b/src/features/workspaces/components/WorkspaceItem.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ // TODO - [TS DEBT] Need to check and remove it | 1 | /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ |
2 | import { Component, ReactElement } from 'react'; | 2 | import { Component, ReactElement } from 'react'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 4 | import withStyles, { WithStylesProps } from 'react-jss'; |
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx b/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx index c9af22c96..e1cc0f785 100644 --- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx +++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx | |||
@@ -14,10 +14,11 @@ const messages = defineMessages({ | |||
14 | }, | 14 | }, |
15 | }); | 15 | }); |
16 | 16 | ||
17 | const wrapperTransition = | 17 | const wrapperTransition = window?.matchMedia( |
18 | window && window.matchMedia('(prefers-reduced-motion: no-preference)') | 18 | '(prefers-reduced-motion: no-preference)', |
19 | ? 'width 0.5s ease' | 19 | ) |
20 | : 'none'; | 20 | ? 'width 0.5s ease' |
21 | : 'none'; | ||
21 | 22 | ||
22 | const styles = theme => ({ | 23 | const styles = theme => ({ |
23 | wrapper: { | 24 | wrapper: { |
diff --git a/src/features/workspaces/components/WorkspacesDashboard.tsx b/src/features/workspaces/components/WorkspacesDashboard.tsx index 06738b38c..c5f8909c1 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.tsx +++ b/src/features/workspaces/components/WorkspacesDashboard.tsx | |||
@@ -147,7 +147,7 @@ class WorkspacesDashboard extends Component<IProps> { | |||
147 | icon="alert" | 147 | icon="alert" |
148 | type="danger" | 148 | type="danger" |
149 | ctaLabel={intl.formatMessage(messages.tryReloadWorkspaces)} | 149 | ctaLabel={intl.formatMessage(messages.tryReloadWorkspaces)} |
150 | // ctaLoading={getUserWorkspacesRequest.isExecuting} // TODO - [TECH DEBT][PROP NOT USED IN COMPONENT] need to check and update | 150 | // ctaLoading={getUserWorkspacesRequest.isExecuting} // TODO: [TECH DEBT][PROP NOT USED IN COMPONENT] need to check and update |
151 | ctaOnClick={getUserWorkspacesRequest.retry} | 151 | ctaOnClick={getUserWorkspacesRequest.retry} |
152 | > | 152 | > |
153 | {intl.formatMessage(messages.workspacesRequestFailed)} | 153 | {intl.formatMessage(messages.workspacesRequestFailed)} |