Skip to content

Commit

Permalink
Merge pull request #23 from 0x1-company/gender-skip
Browse files Browse the repository at this point in the history
feat: 🎸 gender skip
  • Loading branch information
tomokisun authored Dec 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 59a025e + 218d74a commit c857327
Showing 3 changed files with 38 additions and 17 deletions.
30 changes: 24 additions & 6 deletions Packages/BeMatch/Sources/GenderSettingFeature/GenderSetting.swift
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ public struct GenderSettingLogic {
public enum Action {
case onAppear
case genderButtonTapped(BeMatch.Gender)
case skipButtonTapped
case nextButtonTapped
case updateGenderResponse(Result<BeMatch.UpdateGenderMutation.Data, Error>)
case delegate(Delegate)
@@ -63,6 +64,12 @@ public struct GenderSettingLogic {
}))
}

case .skipButtonTapped:
return .run { send in
await feedbackGenerator.impactOccurred()
await send(.delegate(.nextScreen))
}

case .updateGenderResponse(.success):
state.isActivityIndicatorVisible = false
return .send(.delegate(.nextScreen))
@@ -122,12 +129,23 @@ public struct GenderSettingView: View {

Spacer()

PrimaryButton(
String(localized: "Next", bundle: .module),
isLoading: viewStore.isActivityIndicatorVisible,
isDisabled: viewStore.selection == nil
) {
store.send(.nextButtonTapped)
VStack(spacing: 0) {
PrimaryButton(
String(localized: "Next", bundle: .module),
isLoading: viewStore.isActivityIndicatorVisible,
isDisabled: viewStore.selection == nil
) {
store.send(.nextButtonTapped)
}

Button {
store.send(.skipButtonTapped)
} label: {
Text("Skip", bundle: .module)
.frame(height: 50)
.foregroundStyle(Color.white)
.font(.system(.subheadline, weight: .semibold))
}
}
.padding(.horizontal, 16)
}
21 changes: 10 additions & 11 deletions Packages/BeMatch/Sources/GenderSettingFeature/Localizable.xcstrings
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
{
"sourceLanguage" : "en",
"strings" : {
"BeMatch." : {
"extractionState" : "stale",
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "BeMatch."
}
}
}
},
"Female" : {
"localizations" : {
"ja" : {
@@ -52,6 +41,16 @@
}
}
},
"Skip" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "スキップ"
}
}
}
},
"What's your gender?" : {
"localizations" : {
"ja" : {
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"sourceLanguage" : "en",
"strings" : {
"🔗 %@" : {

},
"🔗 BeRe.al/%@" : {
"extractionState" : "stale",
"localizations" : {
"ja" : {
"stringUnit" : {

0 comments on commit c857327

Please sign in to comment.