-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9551ab
commit de1520e
Showing
6 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-disable @typescript-eslint/no-redeclare */ | ||
import { Action } from 'actions'; | ||
|
||
export type UPDATE_EXCLUDED_AREAS = 'UPDATE_EXCLUDED_AREAS'; | ||
export const UPDATE_EXCLUDED_AREAS: UPDATE_EXCLUDED_AREAS = 'UPDATE_EXCLUDED_AREAS'; | ||
|
||
export type updateExcludedAreas = (excludedAreas: string[]) => Action<UPDATE_EXCLUDED_AREAS>; | ||
export const updateExcludedAreas = (excludedAreas: string[]): Action<UPDATE_EXCLUDED_AREAS> => { | ||
return { | ||
type: UPDATE_EXCLUDED_AREAS, | ||
excludedAreas, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Action, UPDATE_EXCLUDED_AREAS, REPLACE_STATE } from '../actions'; | ||
|
||
export function excludedAreas( | ||
state: string[] = [], | ||
action: Action<UPDATE_EXCLUDED_AREAS | REPLACE_STATE>, | ||
) { | ||
switch (action.type) { | ||
case UPDATE_EXCLUDED_AREAS: | ||
return action.excludedAreas; | ||
case REPLACE_STATE: | ||
return action.replaceWith.excludedAreas; | ||
default: | ||
return state; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters