cokolwiek

This commit is contained in:
Piotr K committed 2023-05-27 00:16:50 +02:00
1 parent 5801ecfd29
commit d8c8482696
36 files changed
+745 -508

No files matched your search

@@ -0,0 +1,45 @@
import { createReducer, on } from '@ngrx/store';
import { receivedAllIssuesSuccessAction } from '../actions/issue.actions';
import { IssueState } from '../state/issue.state';
const initialState: IssueState = {
issues: [
{
id: '1',
cords: [18.57187, 54.40984],
title: 'Dziura w drodze na Oliwi',
createdAt: new Date(),
description: 'Wielka dziura',
photos: [],
status: 'new',
type: 'problem',
},
{
id: '2',
cords: [18.58080765011577, 54.41806822519011],
title: 'Dziura w drodze na Żabiance',
createdAt: new Date(),
description: 'Wielka dziura',
photos: [],
status: 'new',
type: 'problem',
},
{
id: '3',
cords: [18.611836200396905, 54.405856587640585],
title: 'Dziura w drodze na Nigdzie',
createdAt: new Date(),
description: 'Wielka dziura',
photos: [],
status: 'new',
type: 'problem',
},
],
};
export const issueReducer = createReducer(
initialState,
on(receivedAllIssuesSuccessAction, (state: IssueState, action) => ({
issues: action.issues,
}))
);