Skip to content

Commit

Permalink
perf: improve spidLogin selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMattew committed Dec 20, 2024
1 parent 1c1a515 commit 14db7aa
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions ts/features/spidLogin/store/selectors/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { createSelector } from "reselect";
import { GlobalState } from "../../../../store/reducers/types";

export const nativeLoginRequestInfoSelector = (state: GlobalState) =>
state.features.loginFeatures.spidLogin.nativeLogin.requestInfo;
export const spidLoginSelector = (state: GlobalState) =>
state.features.loginFeatures.spidLogin;

export const standardLoginRequestInfoSelector = (state: GlobalState) =>
state.features.loginFeatures.spidLogin.standardLogin.requestInfo;
export const nativeLoginRequestInfoSelector = createSelector(
spidLoginSelector,
({ nativeLogin }) => nativeLogin.requestInfo
);

export const standardLoginRequestInfoSelector = createSelector(
spidLoginSelector,
({ standardLogin }) => standardLogin.requestInfo
);

0 comments on commit 14db7aa

Please sign in to comment.