-
Notifications
You must be signed in to change notification settings - Fork 4
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
71764f7
commit ef0c5f5
Showing
31 changed files
with
442 additions
and
325 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
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 |
---|---|---|
@@ -1,37 +1,15 @@ | ||
import { navigationConstants } from '../_constants'; | ||
|
||
function changeIndex(index) { | ||
function setIndex(i) { | ||
return { type: navigationConstants.CHANGE_INDEX, i }; | ||
function changeIndex(ind) { | ||
function setIndex(index) { | ||
return { type: navigationConstants.CHANGE_INDEX, index }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(setIndex(index)); | ||
}; | ||
} | ||
|
||
function navigate(name) { | ||
function setStack(route) { | ||
return { type: navigationConstants.NAVIGATE, route }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(setStack(name)); | ||
}; | ||
} | ||
|
||
function goBack() { | ||
function setStack() { | ||
return { type: navigationConstants.BACK }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(setStack()); | ||
dispatch(setIndex(ind)); | ||
}; | ||
} | ||
|
||
export const navigationActions = { | ||
changeIndex, | ||
navigate, | ||
goBack | ||
changeIndex | ||
}; |
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 |
---|---|---|
@@ -1,29 +1,48 @@ | ||
import { targetConstants } from '../_constants'; | ||
// import { NavigationActions } from 'react-navigation'; | ||
|
||
function openTarget(targ) { | ||
function openMapTarget(targ) { | ||
function open(target) { | ||
return { type: targetConstants.SELECT_TARGET, target }; | ||
return { type: targetConstants.SELECT_MAP_TARGET, target }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(open(targ)); | ||
// NavigationActions.navigate({ routeName: 'Target' }); | ||
}; | ||
} | ||
|
||
function closeTarget() { | ||
function closeMapTarget() { | ||
function close() { | ||
return { type: targetConstants.DESELECT_TARGET }; | ||
return { type: targetConstants.DESELECT_MAP_TARGET }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(close()); | ||
}; | ||
} | ||
|
||
function openListTarget(targ) { | ||
function open(target) { | ||
return { type: targetConstants.SELECT_LIST_TARGET, target }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(open(targ)); | ||
}; | ||
} | ||
|
||
function closeListTarget() { | ||
function close() { | ||
return { type: targetConstants.DESELECT_LIST_TARGET }; | ||
} | ||
|
||
return dispatch => { | ||
dispatch(close()); | ||
// NavigationActions.navigate({ routeName: 'Tabs' }); | ||
}; | ||
} | ||
|
||
export const targetActions = { | ||
openTarget, | ||
closeTarget | ||
openMapTarget, | ||
closeMapTarget, | ||
openListTarget, | ||
closeListTarget | ||
}; |
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
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
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
Oops, something went wrong.