This commit is contained in:
2026-10-07 12:10:12 +03:00
parent e384bc4872
commit e676717ffb
28 changed files with 722 additions and 236 deletions
+18 -2
View File
@@ -3,8 +3,14 @@ import { createSelector } from '@ngrx/store';
import { NIZHNY_NOVGOROD } from '../data/nizhny-novgorod';
import { gorodarFeature } from './gorodar.reducer';
export const { selectCollectedIds, selectPhotos, selectCollectedAt, selectClaim, selectProfile } =
gorodarFeature;
export const {
selectCollectedIds,
selectPhotos,
selectCollectedAt,
selectClaim,
selectProfile,
selectAuth,
} = gorodarFeature;
export const selectCollectedIdSet = createSelector(selectCollectedIds, (ids) => new Set(ids));
@@ -19,6 +25,16 @@ export const selectProgress = createSelector(selectOpenedCount, (opened) =>
Math.round((opened / selectTotalCount) * 100),
);
export const selectAuthenticated = createSelector(selectAuth, (auth) => auth.authenticated);
export const selectAuthEmail = createSelector(selectAuth, (auth) => auth.email);
export const selectAuthStep = createSelector(selectAuth, (auth) => auth.step);
export const selectAuthError = createSelector(selectAuth, (auth) => auth.error);
export const selectAuthPending = createSelector(selectAuth, (auth) => auth.pending);
export const selectAuthResendSeconds = createSelector(selectAuth, (auth) => auth.resendSeconds);
export const selectAuthSheetVisible = createSelector(selectAuth, (auth) => auth.sheetVisible);
export const selectAuthIntent = createSelector(selectAuth, (auth) => auth.intent);
export const selectAuthCodeRequestId = createSelector(selectAuth, (auth) => auth.codeRequestId);
export const selectClaimPhoto = createSelector(selectClaim, (claim) => claim.photo);
export const selectClaimStage = createSelector(selectClaim, (claim) => claim.stage);
export const selectClaimStep = createSelector(selectClaim, (claim) => claim.step);