Skip to content

Commit a2cf646

Browse files
committed
πŸ”§ [chore] μ½”λ“œ 정리
1 parent 2c9a921 commit a2cf646

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

β€ŽFitfty/Projects/Coordinator/Sources/Setting/SettingCoordinator.swiftβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ extension SettingCoordinator: SettingCoordinatorInterface {
9999
}
100100

101101
func showTermsOfUse() {
102-
let webViewController = SettingWebViewController(url: "https://maze-mozzarella-6e5.notion.site/dd559e6017ee499fa569148b8621966d")
102+
let webViewController = FitftyWebViewController(url: "https://maze-mozzarella-6e5.notion.site/dd559e6017ee499fa569148b8621966d")
103103
navigationController.present(webViewController, animated: true)
104104
}
105105

106106
func showPrivacyRule() {
107-
let webViewController = SettingWebViewController(url: "https://maze-mozzarella-6e5.notion.site/ed1e98c3fee5417b89f85543f4a398d2")
107+
let webViewController = FitftyWebViewController(url: "https://maze-mozzarella-6e5.notion.site/ed1e98c3fee5417b89f85543f4a398d2")
108108
navigationController.present(webViewController, animated: true)
109109
}
110110

β€ŽFitfty/Projects/Setting/Sources/PersonalInfo/ViewModel/PersonalInfoViewModel.swiftβ€Ž

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ public final class PersonalInfoViewModel: ViewModelType {
5050
}
5151

5252
func didTapSaveButton(nickname: String?, birthday: String?) {
53-
guard let nickname = nickname else {
54-
currentState.send(.showErrorAlert(SettingError.noNickname))
55-
return
56-
}
57-
58-
guard let birthday = birthday else {
59-
currentState.send(.showErrorAlert(SettingError.noBirthday))
60-
return
61-
}
62-
6353
checkAvailableNickname(nickname)
6454
checkAvailableBirthday(birthday)
6555

@@ -143,20 +133,20 @@ private extension PersonalInfoViewModel {
143133
}
144134
}
145135

146-
func checkAvailableNickname(_ nickname: String) {
136+
func checkAvailableNickname(_ nickname: String?) {
147137
self.userPrivacy.nickname = nickname
148138
let regex = "^[0-9a-zA-Z._]{1,30}$"
149-
if nickname.range(of: regex, options: .regularExpression) != nil {
139+
if nickname?.range(of: regex, options: .regularExpression) != nil {
150140
hasAvailableNickname = true
151141
} else {
152142
hasAvailableNickname = false
153143
}
154144
}
155145

156-
func checkAvailableBirthday(_ birthday: String) {
146+
func checkAvailableBirthday(_ birthday: String?) {
157147
self.userPrivacy.birtyday = birthday
158148
let regex = "^[0-9]{6}$"
159-
if birthday.range(of: regex, options: .regularExpression) != nil {
149+
if birthday?.range(of: regex, options: .regularExpression) != nil {
160150
hasAvailableBirthday = true
161151
} else {
162152
hasAvailableBirthday = false

0 commit comments

Comments
Β (0)