Skip to content

Commit

Permalink
Merge pull request #120 from gerteck/refactor/tabGoBack
Browse files Browse the repository at this point in the history
Refactor back behavior in transaction history and spending report
  • Loading branch information
CJerrong authored Jul 31, 2023
2 parents 5aa7db9 + 559c813 commit 51c9151
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SpendingReportTabs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const SpendingReportTabs = ({ documents, navigation }) => {

return (
<>
<Tab.Navigator initialRouteName={"This Month"} screenOptions={tabScreenOptions} backBehavior="history">
<Tab.Navigator initialRouteName={"This Month"} screenOptions={tabScreenOptions} backBehavior="initial route">
<Tab.Screen name={names[2]} children={() => <Report transactions={monthDocs[4]} averagePoint={average} point={monthSpendingToThisPoint[4]} monthName={monthNames[4]}
navigation={navigation} />} />

Expand Down
2 changes: 1 addition & 1 deletion src/components/TransactionTabs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const TransactionTabs = ({ docs, navigation }) => {


return (
<Tab.Navigator initialRouteName={"This Month"} screenOptions={tabScreenOptions} backBehavior="history">
<Tab.Navigator initialRouteName={"This Month"} screenOptions={tabScreenOptions} backBehavior="initial route">
<Tab.Screen name={names[2]} children={() => <TransactionList transactions={monthDocs[4]} navigation={navigation} screenName={names[2]}/>} />
<Tab.Screen name={names[1]} children={() => <TransactionList transactions={monthDocs[3]} navigation={navigation} screenName={names[1]}/>} />
<Tab.Screen name={names[0]} children={() => <TransactionList transactions={monthDocs[2]} navigation={navigation} screenName={names[0]}/>} />
Expand Down

0 comments on commit 51c9151

Please sign in to comment.