Skip to content

Commit 4f66c06

Browse files
remove dead code
1 parent 195e732 commit 4f66c06

File tree

11 files changed

+4
-55
lines changed

11 files changed

+4
-55
lines changed

src/redux/actions/organizations/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { getMyOrganizationAction } from './getMyOrganizationAction';
21
import { getInviteByCodeAction } from './getInviteByCodeAction';
32
import { getInvitesAction } from './getInvitesAction';
43
import { getOwnerAction } from './getOwnerAction';
@@ -9,7 +8,6 @@ import { deleteInviteAction } from './deleteInviteAction';
98
import { getInvoicesAction } from './getInvoicesAction';
109

1110
export const organizationActions = {
12-
// getMy: getMyOrganizationAction,
1311
inviteByCode: getInviteByCodeAction,
1412
getInvites: getInvitesAction,
1513
getOwner: getOwnerAction,

src/ui/layouts/common/layouts/AuthenticatedLayout/AuthenticatedHeader.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import {
1111

1212
import styles from './AuthenticatedHeader.module.scss';
1313
import { iconColors, iconSizes } from '../../../../../constants/icons';
14-
import {
15-
userSelectors,
16-
organizationSelectors,
17-
} from '../../../../../redux/selectors';
14+
import { userSelectors } from '../../../../../redux/selectors';
1815
import { getInitials } from '../../../../../utils/name';
1916
import { DEFAULT_FULL_NAME } from '../../../../../constants';
2017
import OutsideClickHandler from 'react-outside-click-handler';
@@ -26,7 +23,7 @@ export const AuthenticatedHeader: React.FC<{
2623
setMobileMenuOpen: (val: boolean) => void;
2724
}> = ({ setMobileMenuOpen }) => {
2825
const user = useSelector(userSelectors.myUser);
29-
// const organization = useSelector(organizationSelectors.myOrganization);
26+
3027
const [popupOpen, setPopupOpen] = useState<boolean>(false);
3128
const dispatch = useDispatch();
3229
const { push } = usePushRoute();

src/ui/layouts/pipelines/BasePage.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55
import { Tabs } from '../common/Tabs';
66
import Header from './Header';
77
import Pipelines from './Pipelines';
8-
import { useService } from './useService';
98

109
export const BasePage: React.FC<{
1110
tabPages: TabPage[];
@@ -21,12 +20,6 @@ export const BasePage: React.FC<{
2120
headerWithButtons,
2221
children,
2322
}) => {
24-
// const { organization } = useService();
25-
26-
// if (!organization) return null;
27-
28-
// const organizationName = organization.name;
29-
3023
return (
3124
<AuthenticatedLayout>
3225
<SidebarContainer>

src/ui/layouts/pipelines/PipelineDetail/Runs/useService.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useEffect } from 'react';
21
import { useSelector } from 'react-redux';
32
import {
43
runPagesSelectors,
@@ -17,7 +16,6 @@ export const useService = ({
1716
}): ServiceInterface => {
1817
const fetching = useSelector(runPagesSelectors.fetching);
1918
const runs: TRun[] = useSelector(runSelectors.runsForPipelineId(pipelineId));
20-
// useEffect(() => {}, [runs]);
2119

2220
const runIds = runs.map((run: TRun) => run.id);
2321

src/ui/layouts/runs/BasePage.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55
import { Tabs } from '../common/Tabs';
66
import Header from './Header';
77
import Stacks from './Stacks';
8-
import { useService } from './useService';
98

109
export const BasePage: React.FC<{
1110
tabPages: TabPage[];
@@ -21,12 +20,6 @@ export const BasePage: React.FC<{
2120
headerWithButtons,
2221
children,
2322
}) => {
24-
// const { organization } = useService();
25-
26-
// if (!organization) return null;
27-
28-
// const organizationName = organization.name;
29-
3023
return (
3124
<AuthenticatedLayout>
3225
<SidebarContainer>

src/ui/layouts/session/Login/useService.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { useState } from 'react';
22
import { toasterTypes } from '../../../../constants';
3-
import {
4-
organizationActions,
5-
showToasterAction,
6-
userActions,
7-
} from '../../../../redux/actions';
3+
import { showToasterAction, userActions } from '../../../../redux/actions';
84
import { loginAction } from '../../../../redux/actions/session/loginAction';
95
import { useDispatch, usePushRoute } from '../../../hooks';
106
import { translate } from './translate';

src/ui/layouts/settings/Organization/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React, { useState, useEffect } from 'react';
2-
import { useSelector } from 'react-redux';
32
import { organizationActions } from '../../../../redux/actions';
4-
import { organizationSelectors } from '../../../../redux/selectors';
53

64
import {
75
FlexBox,
@@ -27,9 +25,6 @@ export const Organization: React.FC = () => {
2725
const [popupOpen, setPopupOpen] = useState(false);
2826
const [currentTable, setCurrentTable] = useState('members');
2927

30-
const organization = useSelector(organizationSelectors.myOrganization);
31-
// const members = useSelector(organizationSelectors.myMembers);
32-
3328
const {
3429
filteredMembers,
3530
setFilteredMembers,
@@ -48,7 +43,6 @@ export const Organization: React.FC = () => {
4843
activeSortingDirection,
4944
setActiveSortingDirection,
5045
});
51-
// useRequestOnMount(organizationActions.getMy);
5246
useRequestOnMount(organizationActions.getRoles);
5347

5448
useEffect(() => {
@@ -60,8 +54,6 @@ export const Organization: React.FC = () => {
6054
);
6155
}, [dispatch]);
6256

63-
// if (!organization) return null;
64-
6557
return (
6658
<>
6759
{popupOpen && <InvitePopup setPopupOpen={setPopupOpen} />}

src/ui/layouts/settings/PersonalDetails.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import {
99
} from '../../components';
1010
import { useRequestOnMount, useSelector } from '../../hooks';
1111
import {
12-
organizationActions,
1312
sessionActions,
1413
showToasterAction,
1514
userActions,
1615
} from '../../../redux/actions';
1716

18-
import { organizationSelectors, userSelectors } from '../../../redux/selectors';
17+
import { userSelectors } from '../../../redux/selectors';
1918
import { getTranslateByScope } from '../../../services';
2019
import { useDispatch } from 'react-redux';
2120
import { toasterTypes } from '../../../constants';
@@ -25,11 +24,9 @@ import { EmailPopup } from './EmailPopup';
2524
export const translate = getTranslateByScope('ui.layouts.PersonalDetails');
2625

2726
export const PersonalDetails: React.FC = () => {
28-
// useRequestOnMount(organizationActions.getMy, {});
2927
useRequestOnMount(userActions.getMy, {});
3028
const dispatch = useDispatch();
3129

32-
const organization = useSelector(organizationSelectors.myOrganization);
3330
const user = useSelector(userSelectors.myUser);
3431

3532
const [submitting, setSubmitting] = useState(false);

src/ui/layouts/stackComponents/BasePage.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55
import { Tabs } from '../common/Tabs';
66
import Header from './Header';
77
import Stacks from './Stacks';
8-
import { useService } from './useService';
98

109
export const BasePage: React.FC<{
1110
tabPages: TabPage[];
@@ -21,12 +20,6 @@ export const BasePage: React.FC<{
2120
headerWithButtons,
2221
children,
2322
}) => {
24-
// const { organization } = useService();
25-
26-
// if (!organization) return null;
27-
28-
// const organizationName = organization.name;
29-
3023
return (
3124
<AuthenticatedLayout>
3225
<SidebarContainer>

src/ui/layouts/stacks/BasePage.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55
import { Tabs } from '../common/Tabs';
66
import Header from './Header';
77
import Stacks from './Stacks';
8-
import { useService } from './useService';
98

109
export const BasePage: React.FC<{
1110
tabPages: TabPage[];
@@ -21,12 +20,6 @@ export const BasePage: React.FC<{
2120
headerWithButtons,
2221
children,
2322
}) => {
24-
// const { organization } = useService();
25-
26-
// if (!organization) return null;
27-
28-
// const organizationName = organization.name;
29-
3023
return (
3124
<AuthenticatedLayout>
3225
<SidebarContainer>

0 commit comments

Comments
 (0)