File tree Expand file tree Collapse file tree 11 files changed +4
-55
lines changed
redux/actions/organizations
common/layouts/AuthenticatedLayout Expand file tree Collapse file tree 11 files changed +4
-55
lines changed Original file line number Diff line number Diff line change 1- import { getMyOrganizationAction } from './getMyOrganizationAction' ;
21import { getInviteByCodeAction } from './getInviteByCodeAction' ;
32import { getInvitesAction } from './getInvitesAction' ;
43import { getOwnerAction } from './getOwnerAction' ;
@@ -9,7 +8,6 @@ import { deleteInviteAction } from './deleteInviteAction';
98import { getInvoicesAction } from './getInvoicesAction' ;
109
1110export const organizationActions = {
12- // getMy: getMyOrganizationAction,
1311 inviteByCode : getInviteByCodeAction ,
1412 getInvites : getInvitesAction ,
1513 getOwner : getOwnerAction ,
Original file line number Diff line number Diff line change @@ -11,10 +11,7 @@ import {
1111
1212import styles from './AuthenticatedHeader.module.scss' ;
1313import { iconColors , iconSizes } from '../../../../../constants/icons' ;
14- import {
15- userSelectors ,
16- organizationSelectors ,
17- } from '../../../../../redux/selectors' ;
14+ import { userSelectors } from '../../../../../redux/selectors' ;
1815import { getInitials } from '../../../../../utils/name' ;
1916import { DEFAULT_FULL_NAME } from '../../../../../constants' ;
2017import 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 ( ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55import { Tabs } from '../common/Tabs' ;
66import Header from './Header' ;
77import Pipelines from './Pipelines' ;
8- import { useService } from './useService' ;
98
109export 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 >
Original file line number Diff line number Diff line change 1- import { useEffect } from 'react' ;
21import { useSelector } from 'react-redux' ;
32import {
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
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55import { Tabs } from '../common/Tabs' ;
66import Header from './Header' ;
77import Stacks from './Stacks' ;
8- import { useService } from './useService' ;
98
109export 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 >
Original file line number Diff line number Diff line change 11import { useState } from 'react' ;
22import { toasterTypes } from '../../../../constants' ;
3- import {
4- organizationActions ,
5- showToasterAction ,
6- userActions ,
7- } from '../../../../redux/actions' ;
3+ import { showToasterAction , userActions } from '../../../../redux/actions' ;
84import { loginAction } from '../../../../redux/actions/session/loginAction' ;
95import { useDispatch , usePushRoute } from '../../../hooks' ;
106import { translate } from './translate' ;
Original file line number Diff line number Diff line change 11import React , { useState , useEffect } from 'react' ;
2- import { useSelector } from 'react-redux' ;
32import { organizationActions } from '../../../../redux/actions' ;
4- import { organizationSelectors } from '../../../../redux/selectors' ;
53
64import {
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 } /> }
Original file line number Diff line number Diff line change @@ -9,13 +9,12 @@ import {
99} from '../../components' ;
1010import { useRequestOnMount , useSelector } from '../../hooks' ;
1111import {
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' ;
1918import { getTranslateByScope } from '../../../services' ;
2019import { useDispatch } from 'react-redux' ;
2120import { toasterTypes } from '../../../constants' ;
@@ -25,11 +24,9 @@ import { EmailPopup } from './EmailPopup';
2524export const translate = getTranslateByScope ( 'ui.layouts.PersonalDetails' ) ;
2625
2726export 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 ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55import { Tabs } from '../common/Tabs' ;
66import Header from './Header' ;
77import Stacks from './Stacks' ;
8- import { useService } from './useService' ;
98
109export 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 >
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { SidebarContainer } from '../common/layouts/SidebarContainer';
55import { Tabs } from '../common/Tabs' ;
66import Header from './Header' ;
77import Stacks from './Stacks' ;
8- import { useService } from './useService' ;
98
109export 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 >
You can’t perform that action at this time.
0 commit comments