Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw committed Jan 5, 2024
1 parent 311ad28 commit 2a2182c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ struct SharedState {
enum Tab { case stats, profile }

struct State: Equatable {
var stats = Stats.State()
var currentTab = Tab.stats
var stats = Stats.State()

/// The Profile.State can be derived from the Stats.State by getting and setting the parts it
/// cares about. This allows the profile feature to operate on a subset of app state instead of
Expand All @@ -48,9 +48,9 @@ struct SharedState {
}

enum Action {
case stats(Stats.Action)
case profile(Profile.Action)
case selectTab(Tab)
case stats(Stats.Action)
}

var body: some Reducer<State, Action> {
Expand All @@ -64,7 +64,7 @@ struct SharedState {

Reduce { state, action in
switch action {
case .stats, .profile:
case .profile, .stats:
return .none
case let .selectTab(tab):
state.currentTab = tab
Expand Down

0 comments on commit 2a2182c

Please sign in to comment.