Skip to content

Commit

Permalink
Coude cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas345 committed Apr 29, 2024
1 parent 7ab0e4f commit 5f8acb9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/modules/home/power-overview_module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PowerOverviewModule extends React.Component<PowerOverviewProps
this.resetLocalState();
}

static mapStateToProps(state: ApplicationState, localProps: PowerOverviewLocalProps): PowerOverviewProps {
static mapStateToProps(state: ApplicationState): PowerOverviewProps {
return {
loggedInUser: state.profileStore.consultant,
viewProfiles: state.viewProfileSlice.viewProfiles().toArray()
Expand Down
5 changes: 1 addition & 4 deletions src/modules/navigation/authenticated-route_module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import * as React from 'react';
import {ApplicationState} from '../../reducers/reducerIndex';
import {ThunkDispatch} from 'redux-thunk';
import {LoginStatus} from '../../model/LoginStatus';
import {Redirect, Route} from 'react-router-dom';
import {Route} from 'react-router-dom';
import {RouteProps} from 'react-router';
import {Paths} from '../../Paths';
import {connect} from 'react-redux';
import {ProfileSelect} from "../profile-select_module";
import {ComponentType} from "react";

interface AuthenticatedRouteDialogProps {
isLoggedIn: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/modules/profile-select_module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {getImagePath} from '../API_CONFIG';
import {PwrRaisedButton} from './general/pwr-raised-button';
import ArrowRight from '@material-ui/icons/ArrowRight';
import {connect} from 'react-redux';
import {CrossCuttingAsyncActionCreator} from '../reducers/crosscutting/CrossCuttingAsyncActionCreator';
import {NavigationActionCreator} from '../reducers/navigation/NavigationActionCreator';
import {Paths} from '../Paths';

Expand Down
1 change: 0 additions & 1 deletion src/reducers/admin/AdminActionCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {ProfileServiceClient} from '../../clients/ProfileServiceClient';
import {PowerApiError} from '../../clients/PowerHttpClient';
import {SkillServiceClient} from '../../clients/SkillServiceClient';
import {Alerts} from '../../utils/Alerts';
import {CrossCuttingAsyncActionCreator} from '../crosscutting/CrossCuttingAsyncActionCreator';
import {SuggestionAsyncActionCreator} from '../suggestions/SuggestionAsyncActionCreator';
import {AbstractAction, ChangeBoolValueAction, ChangeNumberValueAction, ChangeStringValueAction} from '../BaseActions';
import {makeDeferrable} from '../deferred/AsyncActionUnWrapper';
Expand Down
6 changes: 3 additions & 3 deletions src/reducers/crosscutting/CrossCuttingAsyncActionCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export namespace CrossCuttingAsyncActionCreator {
}

export function AsyncLogOutUser() {
return function(dispatch: ThunkDispatch<any, any, any>, getState: () => ApplicationState) {
return function(dispatch: ThunkDispatch<any, any, any>) {
dispatch(CrossCuttingActionCreator.SetLoginStatus(LoginStatus.INITIALS));
dispatch(resetProfileStore());
dispatch(ViewProfileActionCreator.ResetViewState());
Expand All @@ -38,7 +38,7 @@ export namespace CrossCuttingAsyncActionCreator {
}

export function AsyncRenewLogin(authResponse: AuthenticationResult) {
return function(dispatch: ThunkDispatch<any, any, any>, getState: () => ApplicationState) {
return function(dispatch: ThunkDispatch<any, any, any>) {
// If the user is an admin => validate admin authentication
if (isAdmin(authResponse)) {
dispatch(AdminActionCreator.AsyncValidateAuthentication());
Expand Down Expand Up @@ -88,7 +88,7 @@ export namespace CrossCuttingAsyncActionCreator {
}

export function AsyncLogInUser(authResponse: AuthenticationResult) {
return function(dispatch: ThunkDispatch<any, any, any>, getState: () => ApplicationState) {
return function(dispatch: ThunkDispatch<any, any, any>) {
if (isAdmin(authResponse)) {
dispatch(AdminActionCreator.AsyncValidateAuthentication());
}
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/view/ViewProfileActionCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export namespace ViewProfileActionCreator {
}

export function AsyncCreateChangedViewProfile(initials: string, oldId: string, newName: string, newDescription: string, keepOld: boolean) {
return function (dispatch: redux.Dispatch, getState: () => ApplicationState) {
return function (dispatch: redux.Dispatch) {
dispatch(CrossCuttingActionCreator.startRequest());
let body = {
name: newName,
Expand Down Expand Up @@ -307,7 +307,7 @@ export namespace ViewProfileActionCreator {
}

export function AsyncGetParentCategories(skill: ViewSkill) {
return function (dispatch: redux.Dispatch, getState: () => ApplicationState) {
return function (dispatch: redux.Dispatch) {
viewProfileClient.getParentCategories(skill.name)
.then((response) => dispatch(SetParentForSkill(response)))
.catch((error) => console.error(error))
Expand Down
1 change: 0 additions & 1 deletion src/reducers/view/ViewProfileReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {isNullOrUndefined} from 'util';
import {ActionType} from '../ActionType';
import {ViewProfileActions} from './ViewProfileActions';
import {AbstractAction} from '../BaseActions';
import {ViewCategory} from '../../model/view/ViewCategory';

export namespace ViewProfileReducer {
import SetViewProfileAction = ViewProfileActions.SetViewProfileAction;
Expand Down

0 comments on commit 5f8acb9

Please sign in to comment.