add mp with icons and update after review

This commit is contained in:
2026-10-05 13:05:36 +03:00
parent c17c97bd2b
commit 0e2bcf0380
69 changed files with 1907 additions and 813 deletions
+53 -41
View File
@@ -20,7 +20,7 @@ export const initialState: GorodarState = {
firstName: 'Иван',
lastName: 'Иванов',
city: 'Нижний Новгород',
email: 'ivan.ivanovich@gorodar.app',
email: '',
phone: '+7 900 123-45-67',
joinedLabel: 'Сентябрь 2026',
},
@@ -28,46 +28,58 @@ export const initialState: GorodarState = {
const gorodarReducer = createReducer(
initialState,
on(GorodarActions.photoCaptured, (state, { landmarkId, photo }): GorodarState => ({
...state,
claim: {
landmarkId,
photo,
stage: 'check',
step: 1,
},
})),
on(GorodarActions.claimStepChanged, (state, { step }): GorodarState => ({
...state,
claim: {
...state.claim,
step,
},
})),
on(GorodarActions.claimCompleted, (state, { landmarkId, photo, collectedAt }): GorodarState => ({
...state,
collectedIds: state.collectedIds.includes(landmarkId)
? state.collectedIds
: [...state.collectedIds, landmarkId],
photos: {
...state.photos,
[landmarkId]: photo,
},
collectedAt: {
...state.collectedAt,
[landmarkId]: collectedAt,
},
claim: {
landmarkId,
photo,
stage: 'success',
step: 3,
},
})),
on(GorodarActions.claimReset, (state): GorodarState => ({
...state,
claim: initialClaim,
})),
on(
GorodarActions.photoCaptured,
(state, { landmarkId, photo }): GorodarState => ({
...state,
claim: {
landmarkId,
photo,
stage: 'check',
step: 1,
},
}),
),
on(
GorodarActions.claimStepChanged,
(state, { step }): GorodarState => ({
...state,
claim: {
...state.claim,
step,
},
}),
),
on(
GorodarActions.claimCompleted,
(state, { landmarkId, photo, collectedAt }): GorodarState => ({
...state,
collectedIds: state.collectedIds.includes(landmarkId)
? state.collectedIds
: [...state.collectedIds, landmarkId],
photos: {
...state.photos,
[landmarkId]: photo,
},
collectedAt: {
...state.collectedAt,
[landmarkId]: collectedAt,
},
claim: {
landmarkId,
photo,
stage: 'success',
step: 3,
},
}),
),
on(
GorodarActions.claimReset,
(state): GorodarState => ({
...state,
claim: initialClaim,
}),
),
);
export const gorodarFeature = createFeature({