diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2023-05-28 13:48:21 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2023-05-28 13:48:21 +0530 |
commit | 99ca310c73024b51fed1f3077375eed7827f2c20 (patch) | |
tree | 2bd15986f448129a2291acba90ccc6bf68a233e0 /src/features/workspaces | |
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')
5 files changed, 14 insertions, 12 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)} |
diff --git a/src/features/workspaces/store.ts b/src/features/workspaces/store.ts index d63feb1f8..53e3b62ed 100644 --- a/src/features/workspaces/store.ts +++ b/src/features/workspaces/store.ts | |||
@@ -28,7 +28,7 @@ export default class WorkspacesStore extends FeatureStore { | |||
28 | 28 | ||
29 | @observable nextWorkspace: Workspace | undefined; | 29 | @observable nextWorkspace: Workspace | undefined; |
30 | 30 | ||
31 | @observable workspaceBeingEdited: any = null; // TODO - [TS DEBT] fix type later | 31 | @observable workspaceBeingEdited: any = null; // TODO: [TS DEBT] fix type later |
32 | 32 | ||
33 | @observable isSwitchingWorkspace = false; | 33 | @observable isSwitchingWorkspace = false; |
34 | 34 | ||
@@ -36,7 +36,7 @@ export default class WorkspacesStore extends FeatureStore { | |||
36 | 36 | ||
37 | @observable isSettingsRouteActive = false; | 37 | @observable isSettingsRouteActive = false; |
38 | 38 | ||
39 | stores: any; // TODO - [TS DEBT] fix type later | 39 | stores: any; // TODO: [TS DEBT] fix type later |
40 | 40 | ||
41 | actions: Actions | undefined; | 41 | actions: Actions | undefined; |
42 | 42 | ||